mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 03:54:10 +01:00
hmmm, doh ... of course removing the preg_quote here is no doubt going to cause bug reports of "I can't censor xyz@asd" ...
git-svn-id: file:///svn/phpbb/trunk@2065 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
22b58414dd
commit
543caeaa4e
@ -765,21 +765,19 @@ function obtain_word_list(&$orig_word, &$replacement_word)
|
||||
//
|
||||
$sql = "SELECT word, replacement
|
||||
FROM " . WORDS_TABLE;
|
||||
if( !$words_result = $db->sql_query($sql) )
|
||||
if( !($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) )
|
||||
{
|
||||
if ( $row = $db->sql_fetchrow($result) )
|
||||
do
|
||||
{
|
||||
do
|
||||
{
|
||||
$orig_word[] = "#\b(" . str_replace("\*", "\w*?", $row['word']) . ")\b#is";
|
||||
$replacement_word[] = $row['replacement'];
|
||||
}
|
||||
while ( $row = $db->sql_fetchrow($result) );
|
||||
$orig_word[] = "#\b(" . str_replace("*", "\w*?", $row['word']) . ")\b#is";
|
||||
$replacement_word[] = $row['replacement'];
|
||||
}
|
||||
while ( $row = $db->sql_fetchrow($result) );
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user