diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-02-08 01:44:27 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-02-08 01:44:27 +0000 |
commit | 543caeaa4e4529a1ee8a0ae580f8c50e1490bb22 (patch) | |
tree | 4a8163997f9d779ca44a60737c1574bf3cdda6bb /phpBB/includes/functions.php | |
parent | 22b58414ddfb9b02b2226346465ca446728575b2 (diff) | |
download | forums-543caeaa4e4529a1ee8a0ae580f8c50e1490bb22.tar forums-543caeaa4e4529a1ee8a0ae580f8c50e1490bb22.tar.gz forums-543caeaa4e4529a1ee8a0ae580f8c50e1490bb22.tar.bz2 forums-543caeaa4e4529a1ee8a0ae580f8c50e1490bb22.tar.xz forums-543caeaa4e4529a1ee8a0ae580f8c50e1490bb22.zip |
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
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 995bb3d554..d2053c0290 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -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; |