aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/functions.php4
-rw-r--r--phpBB/language/en/acp/posting.php8
-rw-r--r--phpBB/search.php3
-rw-r--r--phpBB/viewtopic.php7
4 files changed, 14 insertions, 8 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index ea8b45116a..ab30aba48d 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -2527,7 +2527,7 @@ function strip_bbcode(&$text, $uid = '')
$uid = '[0-9a-z]{5,}';
}
- $text = preg_replace("#\[\/?[a-z0-9\*\+\-]+(?:=.*?)?(?::[a-z])?(\:?$uid)\]#", ' ', $text);
+ $text = preg_replace("#\[\/?[a-z0-9\*\+\-]+(?:=(?:".*"|[^\]]*))?(?::[a-z])?(\:$uid)\]#", ' ', $text);
$match = get_preg_expression('bbcode_htm');
$replace = array('\1', '\1', '\2', '\1', '', '');
@@ -3689,6 +3689,8 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
{
return;
}
+ static $counter = 0;
+ $counter++; //echo "<b>"; var_dump($counter); echo "</b>";
if (strpos($errfile, 'cache') === false && strpos($errfile, 'template.') === false)
{
diff --git a/phpBB/language/en/acp/posting.php b/phpBB/language/en/acp/posting.php
index 87301a3b49..ebbbf61c44 100644
--- a/phpBB/language/en/acp/posting.php
+++ b/phpBB/language/en/acp/posting.php
@@ -109,12 +109,12 @@ $lang = array_merge($lang, array(
'ICONS_ADD' => 'Add a new icon',
'ICON_NONE_ADDED' => 'No icons were added.',
- 'ICONS_ONE_ADDED' => 'The icon has been added successfully.',
+ 'ICONS_ONE_ADDED' => 'The icon has been added successfully.',
'ICONS_ADDED' => 'The icons have been added successfully.',
'ICONS_CONFIG' => 'Icon configuration',
'ICONS_DELETED' => 'The icon has been removed successfully.',
'ICONS_EDIT' => 'Edit icon',
- 'ICONS_ONE_EDITED' => 'The icon has been updated successfully.',
+ 'ICONS_ONE_EDITED' => 'The icon has been updated successfully.',
'ICON_NONE_EDITED' => 'No icons were updated.',
'ICONS_EDITED' => 'The icons have been updated successfully.',
'ICONS_HEIGHT' => 'Icon height',
@@ -148,8 +148,8 @@ $lang = array_merge($lang, array(
'SELECT_PACKAGE' => 'Select a package file',
'SMILIES_ADD' => 'Add a new smiley',
- 'SMILIES_NONE_ADDED' => 'No smilies were added.',
- 'SMILIE_ONE_ADDED' => 'The smiley has been added successfully.',
+ 'SMILIES_NONE_ADDED' => 'No smilies were added.',
+ 'SMILIES_ONE_ADDED' => 'The smiley has been added successfully.',
'SMILIES_ADDED' => 'The smilies have been added successfully.',
'SMILIES_CODE' => 'Smiley code',
'SMILIES_CONFIG' => 'Smiley configuration',
diff --git a/phpBB/search.php b/phpBB/search.php
index 89403c8893..9a50ce2fcb 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -776,6 +776,8 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$posts_unapproved = ($row['topic_approved'] && $row['topic_replies'] < $row['topic_replies_real'] && $auth->acl_get('m_approve', $forum_id)) ? true : false;
$u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&amp;t=$result_topic_id", true, $user->session_id) : '';
+ $row['topic_title'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">$1</span>', $row['topic_title']);
+
$tpl_ary = array(
'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
@@ -864,6 +866,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
{
// post highlighting
$row['post_text'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">$1</span>', $row['post_text']);
+ $row['post_subject'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">$1</span>', $row['post_subject']);
}
$tpl_ary = array(
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 1e1788db53..a99279c642 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -1252,15 +1252,16 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
parse_attachments($forum_id, $message, $attachments[$row['post_id']], $update_count);
}
+ // Replace naughty words such as farty pants
+ $row['post_subject'] = censor_text($row['post_subject']);
+
// Highlight active words (primarily for search)
if ($highlight_match)
{
$message = preg_replace('#(?!<.*)(?<!\w)(' . $highlight_match . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">\1</span>', $message);
+ $row['post_subject'] = preg_replace('#(?!<.*)(?<!\w)(' . $highlight_match . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">\1</span>', $row['post_subject']);
}
- // Replace naughty words such as farty pants
- $row['post_subject'] = censor_text($row['post_subject']);
-
// Editing information
if (($row['post_edit_count'] && $config['display_last_edited']) || $row['post_edit_reason'])
{