|
From: Paul S. O. <ps...@us...> - 2002-02-08 01:44:31
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv23453/includes
Modified Files:
functions.php
Log Message:
hmmm, doh ... of course removing the preg_quote here is no doubt going to cause bug reports of "I can't censor xyz@asd" ...
Index: functions.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/functions.php,v
retrieving revision 1.112
retrieving revision 1.113
diff -C2 -r1.112 -r1.113
*** functions.php 8 Feb 2002 01:33:36 -0000 1.112
--- functions.php 8 Feb 2002 01:44:27 -0000 1.113
***************
*** 766,784 ****
$sql = "SELECT word, replacement
FROM " . WORDS_TABLE;
! if( !$words_result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't get censored words from database.", "", __LINE__, __FILE__, $sql);
}
! else
{
! if ( $row = $db->sql_fetchrow($result) )
{
! do
! {
! $orig_word[] = "#\b(" . str_replace("\*", "\w*?", $row['word']) . ")\b#is";
! $replacement_word[] = $row['replacement'];
! }
! while ( $row = $db->sql_fetchrow($result) );
}
}
--- 766,782 ----
$sql = "SELECT word, replacement
FROM " . WORDS_TABLE;
! if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't get censored words from database.", "", __LINE__, __FILE__, $sql);
}
!
! if ( $row = $db->sql_fetchrow($result) )
{
! do
{
! $orig_word[] = "#\b(" . str_replace("*", "\w*?", $row['word']) . ")\b#is";
! $replacement_word[] = $row['replacement'];
}
+ while ( $row = $db->sql_fetchrow($result) );
}
|