[wp-cvs] wordpress/wp-admin edit-comments.php, 1.42,
1.43 options-discussion.php, 1.24, 1.25 upgrade-schema.php,
1.16, 1.17
Matthew Mullenweg
saxmatt at users.sourceforge.net
Mon Jan 10 20:21:07 GMT 2005
Update of /cvsroot/cafelog/wordpress/wp-admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12293/wp-admin
Modified Files:
edit-comments.php options-discussion.php upgrade-schema.php
Log Message:
Spam tastes great, we should eat more of it. Add 'spam' approval value, and basic blacklist.
Index: edit-comments.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/edit-comments.php,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** edit-comments.php 19 Dec 2004 00:21:14 -0000 1.42
--- edit-comments.php 10 Jan 2005 20:21:04 -0000 1.43
***************
*** 67,71 ****
$offset = 0;
! $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments ORDER BY comment_date DESC LIMIT $offset,20");
}
if ('view' == $mode) {
--- 67,71 ----
$offset = 0;
! $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_approved = '0' OR comment_approved = '1' ORDER BY comment_date DESC LIMIT $offset,20");
}
if ('view' == $mode) {
Index: upgrade-schema.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/upgrade-schema.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** upgrade-schema.php 30 Dec 2004 10:58:05 -0000 1.16
--- upgrade-schema.php 10 Jan 2005 20:21:04 -0000 1.17
***************
*** 23,27 ****
comment_content text NOT NULL,
comment_karma int(11) NOT NULL default '0',
! comment_approved enum('0','1') NOT NULL default '1',
comment_agent varchar(255) NOT NULL default '',
comment_type varchar(20) NOT NULL default '',
--- 23,27 ----
comment_content text NOT NULL,
comment_karma int(11) NOT NULL default '0',
! comment_approved enum('0','1','spam') NOT NULL default '1',
comment_agent varchar(255) NOT NULL default '',
comment_type varchar(20) NOT NULL default '',
***************
*** 213,216 ****
--- 213,217 ----
add_option('comment_whitelist', 1);
add_option('page_uris');
+ add_option('blacklist_keys');
// Delete unused options
***************
*** 221,228 ****
// Set up a few options not to load by default
! $fatoptions = array( 'moderation_keys', 'recently_edited' );
foreach ($fatoptions as $fatoption) :
$wpdb->query("UPDATE $wpdb->options SET `autoload` = 'no' WHERE option_name = '$fatoption'");
endforeach;
}
! ?>
--- 222,230 ----
// Set up a few options not to load by default
! $fatoptions = array( 'moderation_keys', 'recently_edited', 'blacklist_keys' );
foreach ($fatoptions as $fatoption) :
$wpdb->query("UPDATE $wpdb->options SET `autoload` = 'no' WHERE option_name = '$fatoption'");
endforeach;
}
!
! ?>
\ No newline at end of file
Index: options-discussion.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/options-discussion.php,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** options-discussion.php 19 Oct 2004 03:03:04 -0000 1.24
--- options-discussion.php 10 Jan 2005 20:21:04 -0000 1.25
***************
*** 23,27 ****
<form name="form1" method="post" action="options.php">
<input type="hidden" name="action" value="update" />
! <input type="hidden" name="page_options" value="'default_pingback_flag','default_ping_status','default_comment_status','comments_notify','moderation_notify','comment_moderation','require_name_email','comment_whitelist','comment_max_links','moderation_keys'" />
<fieldset class="options">
<legend><?php _e('Usual settings for an article: <em>(These settings may be overridden for individual articles.)</em>') ?></legend>
--- 23,27 ----
<form name="form1" method="post" action="options.php">
<input type="hidden" name="action" value="update" />
! <input type="hidden" name="page_options" value="'default_pingback_flag','default_ping_status','default_comment_status','comments_notify','moderation_notify','comment_moderation','require_name_email','comment_whitelist','comment_max_links','moderation_keys','blacklist_keys'" />
<fieldset class="options">
<legend><?php _e('Usual settings for an article: <em>(These settings may be overridden for individual articles.)</em>') ?></legend>
***************
*** 80,86 ****
</p>
<p>
! <a id="retrospambutton" href="options-discussion.php?action=retrospam" title="Click this link to check old comments for spam that your current filters would catch.">Check past comments against current word list</a>
</p>
</fieldset>
<p class="submit">
<input type="submit" name="Submit" value="<?php _e('Update Options') ?>" />
--- 80,93 ----
</p>
<p>
! <a id="retrospambutton" href="options-discussion.php?action=retrospam"><?php _e('Check past comments against moderation list'); ?></a>
</p>
</fieldset>
+ <fieldset class="options">
+ <legend><?php _e('Comment Blacklist') ?></legend>
+ <p><?php _e('This is a list of words that you want completely blacklisted from your blog. Be very careful what you add here, because if a comment matches something here it will be completely nuked and there will be no notification. Remember that partial words can match, so if there is any chance something here might match it would be better to put it in the moderation box above.') ?></p>
+ <p>
+ <textarea name="blacklist_keys" cols="60" rows="4" id="blacklist_keys" style="width: 98%; font-size: 12px;" class="code"><?php form_option('blacklist_keys'); ?></textarea>
+ </p>
+ </fieldset>
<p class="submit">
<input type="submit" name="Submit" value="<?php _e('Update Options') ?>" />
More information about the cvs
mailing list