Changeset 2236

Show
Ignore:
Timestamp:
07/24/08 00:59:38 (6 months ago)
Author:
ringmaster
Message:

Update trunk with changes from r2235.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/htdocs/system/plugins/spamchecker/spamchecker.plugin.php

    r1922 r2236  
    131131        } 
    132132 
     133        // Any commenter that takes longer than the session timeout is automatically moderated 
     134        if(!isset($_SESSION['comments_allowed']) || ! in_array(Controller::get_var('ccode'), $_SESSION['comments_allowed'])) { 
     135            $comment->status = Comment::STATUS_UNAPPROVED; 
     136            $spamcheck[] = _t("The commenter's session timed out."); 
     137        } 
     138 
    133139        if( isset($comment->info->spamcheck) && is_array($comment->info->spamcheck)) { 
    134140            $comment->info->spamcheck = array_unique(array_merge($comment->info->spamcheck, $spamcheck)); 
     
    194200     * @param float $spam_rating The spamminess of the comment as detected by other plugins 
    195201     * @param Comment $comment The submitted comment object 
    196      * @param array $handlervars And array of handlervars passed in via the comment submission URL 
     202     * @param array $handlervars An array of handlervars passed in via the comment submission URL 
    197203     * @return float The original spam rating 
    198204     */ 
     
    209215            die('<h1>' . _t('The selected action is forbidden.') . '</h1>'); 
    210216        } 
    211         if(!isset($_SESSION['comments_allowed']) || ! in_array($handlervars['ccode'], $_SESSION['comments_allowed'])) { 
    212             ob_end_clean(); 
    213             header('HTTP/1.1 403 Forbidden'); 
    214             die('<h1>' . _t('The selected action is forbidden.') . '</h1>'); 
    215         } 
    216217 
    217218        return $spam_rating;