[wp-cvs] wordpress/wp-includes functions.php,1.101,1.101.4.1

Ernest MacDougal Campbell III emc3 at users.sourceforge.net
Thu May 27 08:48:45 CDT 2004


Update of /cvsroot/cafelog/wordpress/wp-includes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1748/wp-includes

Modified Files:
      Tag: WordPress-Ver-1_2-Branch
	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.101
retrieving revision 1.101.4.1
diff -C2 -d -r1.101 -r1.101.4.1
*** functions.php	20 May 2004 13:31:48 -0000	1.101
--- functions.php	27 May 2004 13:48:42 -0000	1.101.4.1
***************
*** 1344,1349 ****
  	$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;
--- 1344,1353 ----
  	$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