Changeset 837 for plugins/preapproved/trunk/preapproved.plugin.php
- Timestamp:
- 08/27/08 17:21:27 (4 months ago)
- Files:
-
- 1 modified
-
plugins/preapproved/trunk/preapproved.plugin.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
plugins/preapproved/trunk/preapproved.plugin.php
r723 r837 22 22 'author' => 'Habari Community', 23 23 'authorurl' => 'http://habariproject.org/', 24 'version' => '1. 2',24 'version' => '1.3', 25 25 'description' => 'Automatically approve comments based on the number of approved comments the commenter has previously made.', 26 26 'license' => 'Apache License 2.0', … … 89 89 function action_comment_insert_before ( $comment ) 90 90 { 91 // This plugin ignores non-comments 92 if( $comment->type == Comment::COMMENT ) {91 // This plugin ignores non-comments and comments already marked as spam 92 if( $comment->type == Comment::COMMENT && $comment->status != Comment::STATUS_SPAM) { 93 93 if( Comments::get( array( 'email' => $comment->email, 'name' => $comment->name, 94 94 'url' => $comment->url, 'status' => Comment::STATUS_APPROVED ) )->count >= Options::get( 'preapproved__approved_count' ) ) { 95 95 $comment->status = Comment::STATUS_APPROVED; 96 EventLog::log( 'Comment by ' . $comment->name . ' automatically approved.', 'info', 'PreApproved', 'Pre Approved' );96 EventLog::log( 'Comment by ' . $comment->name . ' automatically approved.', 'info', 'PreApproved', 'Preapproved' ); 97 97 } 98 98 }
