aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/message_parser.php21
-rw-r--r--phpBB/language/en/acp/database.php2
2 files changed, 6 insertions, 17 deletions
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index 02ac41d503..9ce4c1d6da 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -62,25 +62,14 @@ class bbcode_firstpass extends bbcode
}
else
{
- // TODO: Review this
- $found = false;
foreach ($bbcode_data['regexp'] as $regexp => $replacement)
{
- if (!$found)
- {
- $before = strlen($this->message);
- }
- $this->message = preg_replace($regexp, $replacement, $this->message);
- if (!$found)
+ // The pattern gets compiled and cached by the PCRE extension,
+ // it should not demand recompilation
+ if (preg_match($regexp, $this->message))
{
- $after = strlen($this->message);
- if ($before != $after)
- {
- // Because we add bbcode_uid to all tags, the message length
- // will increase whenever a tag is found
- $bitfield->set($bbcode_data['bbcode_id']);
- $found = true;
- }
+ $this->message = preg_replace($regexp, $replacement, $this->message);
+ $bitfield->set($bbcode_data['bbcode_id']);
}
}
}
diff --git a/phpBB/language/en/acp/database.php b/phpBB/language/en/acp/database.php
index 16e10978ff..5a23ff19ee 100644
--- a/phpBB/language/en/acp/database.php
+++ b/phpBB/language/en/acp/database.php
@@ -31,7 +31,7 @@ if (empty($lang) || !is_array($lang))
// Banning
$lang = array_merge($lang, array(
'DATABASE' => 'Database Utilities',
- 'ACP_BACKUP_EXPLAIN' => 'Here you can backup all your phpBB related data. You may store the resulting archive in your store/ folder or download it directly. Depending on your server configuration you be able to compress the file in a number of formats. If you wish to include any additional "custom" tables please list them in the additional tables field, separated by commas. ',
+ 'ACP_BACKUP_EXPLAIN' => 'Here you can backup all your phpBB related data. You may store the resulting archive in your store/ folder or download it directly. Depending on your server configuration you be able to compress the file in a number of formats.',
'BACKUP_OPTIONS' => 'Backup options',
'BACKUP_TYPE' => 'Backup type',
'BACKUP_INVALID' => 'The selected file to backup is invalid',