[wp-cvs] wordpress/wp-includes functions.php,1.106,1.107
Ernest MacDougal Campbell III
emc3 at users.sourceforge.net
Thu May 27 08:53:29 CDT 2004
Update of /cvsroot/cafelog/wordpress/wp-includes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2806/wp-includes
Modified Files:
functions.php
Log Message:
Fixed check_comment() to ignore empty lines in moderation_keys.
Index: functions.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-includes/functions.php,v
retrieving revision 1.106
retrieving revision 1.107
diff -C2 -d -r1.106 -r1.107
*** functions.php 27 May 2004 03:49:23 -0000 1.106
--- functions.php 27 May 2004 13:53:27 -0000 1.107
***************
*** 1343,1348 ****
$words = explode("\n", get_settings('moderation_keys') );
foreach ($words as $word) {
! $word = trim($word);
! $pattern = "#$word#i";
if ( preg_match($pattern, $author) ) return false;
if ( preg_match($pattern, $email) ) return false;
--- 1343,1352 ----
$words = explode("\n", get_settings('moderation_keys') );
foreach ($words as $word) {
! $word = trim($word);
!
! // Skip empty lines
! if (empty($word)) { continue; }
!
! $pattern = "#$word#i";
if ( preg_match($pattern, $author) ) return false;
if ( preg_match($pattern, $email) ) return false;
More information about the cvs
mailing list