diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2004-02-21 12:47:35 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2004-02-21 12:47:35 +0000 |
| commit | c74d2538ec68fa1c6f3da6d26e31a09f2045557b (patch) | |
| tree | be1c11d7d9e403c7b884c7d08e34111f0806d350 /phpBB/search.php | |
| parent | 9c12fe83db3914b4e35bdcef75cc70e2f75044d6 (diff) | |
| download | forums-c74d2538ec68fa1c6f3da6d26e31a09f2045557b.tar forums-c74d2538ec68fa1c6f3da6d26e31a09f2045557b.tar.gz forums-c74d2538ec68fa1c6f3da6d26e31a09f2045557b.tar.bz2 forums-c74d2538ec68fa1c6f3da6d26e31a09f2045557b.tar.xz forums-c74d2538ec68fa1c6f3da6d26e31a09f2045557b.zip | |
- put consoring and smilie processing into functions (we use them all over the place) for better changing and consistency.
- changed docs/AUTHORS to reflect the recent code re-use in functions_messenger.php
- pleasing the users a little bit more by using table constants. :D
- login box if "mode" is not allowed -> posting (thought about trigger_error integration, but we do not need this that often).
git-svn-id: file:///svn/phpbb/trunk@4836 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/search.php')
| -rw-r--r-- | phpBB/search.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/phpBB/search.php b/phpBB/search.php index 6cbf4d4208..803444c376 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -584,9 +584,8 @@ if ($search_keywords || $search_author || $search_id) $per_page = ($show_results == 'posts') ? $config['posts_per_page'] : $config['topics_per_page']; // Grab icons - $icons = $censors = array(); + $icons = array(); obtain_icons($icons); - obtain_word_list($censors); // Output header $l_search_matches = ($total_match_count == 1) ? sprintf($user->lang['FOUND_SEARCH_MATCH'], $total_match_count) : sprintf($user->lang['FOUND_SEARCH_MATCHES'], $total_match_count); @@ -733,10 +732,11 @@ if ($search_keywords || $search_author || $search_id) continue; } - if (!empty($censors)) +/* if (!empty($censors)) { $row['post_text'] = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace(\$censors['match'], \$censors['replace'], '\\0')", '>' . $row['post_text'] . '<'), 1, -1)); - } + }*/ + $row['post_text'] = censor_text($row['post_text']); if ($row['bbcode_bitfield']) { @@ -752,7 +752,7 @@ if ($search_keywords || $search_author || $search_id) // via php.net's annotated manual $row['post_text'] = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace('#\b(" . $hilit . ")\b#i', '<span class=\"posthilit\">\\\\1</span>', '\\0')", '>' . $row['post_text'] . '<'), 1, -1)); - $row['post_text'] = (empty($config['allow_smilies']) || !$user->data['user_viewsmilies']) ? preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILE_PATH\}\/.*? \/><!\-\- s\1 \-\->#', '\1', $row['post_text']) : str_replace('<img src="{SMILE_PATH}', '<img src="' . $config['smilies_path'], $row['post_text']); + $row['post_text'] = smilie_text($row['post_text']); } $template->assign_block_vars('searchresults', array( @@ -769,11 +769,11 @@ if ($search_keywords || $search_author || $search_id) 'TOPIC_REPLIES' => ($auth->acl_get('m_approve')) ? $row['topic_replies_real'] : $row['topic_replies'], 'TOPIC_VIEWS' => $row['topic_views'], 'FORUM_TITLE' => $row['forum_name'], - 'TOPIC_TITLE' => (!empty($censors)) ? preg_replace($censors['match'], $censors['replace'], $row['topic_title']) : $row['topic_title'], + 'TOPIC_TITLE' => censor_text($row['topic_title']), 'TOPIC_TYPE' => $topic_type, 'POSTER_NAME' => ($row['poster_id'] == ANONYMOUS) ? ((!empty($row['post_username'])) ? $row['post_username'] : $user->lang['GUEST']) : $row['username'], - 'POST_SUBJECT' => (!empty($row['post_subject'])) ? ((!empty($censors)) ? preg_replace($censors['match'], $censors['replace'], $row['post_subject']) : $row['post_subject']) : '', + 'POST_SUBJECT' => censor_text($row['post_subject']), 'POST_DATE' => (!empty($row['post_time'])) ? $user->format_date($row['post_time']) : '', 'MESSAGE' => (!empty($row['post_text'])) ? str_replace("\n", '<br />', $row['post_text']) : '', |
