aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/search.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2003-04-18 13:07:19 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2003-04-18 13:07:19 +0000
commit2bd1ced3396c0eed0d05e8510de5cef691fd9321 (patch)
treebc9d2bbc4d2a482658c13bf563afe8a06dddab2a /phpBB/search.php
parent25015ecc0b27945aebde5235a93c125a3f3984d9 (diff)
downloadforums-2bd1ced3396c0eed0d05e8510de5cef691fd9321.tar
forums-2bd1ced3396c0eed0d05e8510de5cef691fd9321.tar.gz
forums-2bd1ced3396c0eed0d05e8510de5cef691fd9321.tar.bz2
forums-2bd1ced3396c0eed0d05e8510de5cef691fd9321.tar.xz
forums-2bd1ced3396c0eed0d05e8510de5cef691fd9321.zip
some arrangements...
git-svn-id: file:///svn/phpbb/trunk@3883 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/search.php')
-rw-r--r--phpBB/search.php19
1 files changed, 8 insertions, 11 deletions
diff --git a/phpBB/search.php b/phpBB/search.php
index 0cc990647c..994e1eb562 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -653,12 +653,9 @@ if ( $search_keywords != '' || $search_author != '' || $search_id )
$db->sql_freeresult($result);
- //
// Define censored word matches
- //
- $orig_word = array();
- $replacement_word = array();
- obtain_word_list($orig_word, $replacement_word);
+ $censors = array();
+ obtain_word_list($censors);
//
// Output header
@@ -829,12 +826,12 @@ if ( $search_keywords != '' || $search_author != '' || $search_id )
}
}
- if ( count($orig_word) )
+ if ( count($censors['match']) )
{
- $topic_title = preg_replace($orig_word, $replacement_word, $topic_title);
- $post_subject = ( $searchset[$i]['post_subject'] != "" ) ? preg_replace($orig_word, $replacement_word, $searchset[$i]['post_subject']) : $topic_title;
+ $topic_title = preg_replace($censors['match'], $censors['replace'], $topic_title);
+ $post_subject = ( $searchset[$i]['post_subject'] != "" ) ? preg_replace($censors['match'], $censors['replace'], $searchset[$i]['post_subject']) : $topic_title;
- $message = preg_replace($orig_word, $replacement_word, $message);
+ $message = preg_replace($censors['match'], $censors['replace'], $message);
}
else
{
@@ -902,9 +899,9 @@ if ( $search_keywords != '' || $search_author != '' || $search_id )
{
$message = '';
- if ( count($orig_word) )
+ if ( count($censors['match']) )
{
- $topic_title = preg_replace($orig_word, $replacement_word, $searchset[$i]['topic_title']);
+ $topic_title = preg_replace($censors['match'], $censors['replace'], $searchset[$i]['topic_title']);
}
$topic_type = $searchset[$i]['topic_type'];