diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php
index 9ac850fb6e..e161e2a37e 100644
--- a/phpBB/includes/bbcode.php
+++ b/phpBB/includes/bbcode.php
@@ -466,6 +466,7 @@ class bbcode
// when using the /e modifier, preg_replace slashes double-quotes but does not
// seem to slash anything else
$quote = str_replace('\"', '"', $quote);
+ $username = str_replace('\"', '"', $username);
// remove newline at the beginning
if ($quote{0} == "\n")
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 6f49372515..bcf783090f 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -1844,15 +1844,15 @@ function make_clickable($text, $server_url = false)
// Be sure to not let the matches cross over. ;)
// relative urls for this board
- $magic_url_match[] = '#(^|[\n \]]|\()(' . preg_quote($server_url, '#') . ')/(([^[ \t\n\r<"\'\)&]+|&(?!lt;))*)#i';
+ $magic_url_match[] = '#(^|[\n \]]|\()(' . preg_quote($server_url, '#') . ')/(([^[ \t\n\r<"\'\)&]+|&(?!lt;|quot;))*)#i';
$magic_url_replace[] = '$1$3';
// matches a xxxx://aaaaa.bbb.cccc. ...
- $magic_url_match[] = '#(^|[\n \]]|\()([\w]+:/{2}.*?([^[ \t\n\r<"\'\)&]+|&(?!lt;))*)#ie';
+ $magic_url_match[] = '#(^|[\n \]]|\()([\w]+:/{2}.*?([^[ \t\n\r<"\'\)&]+|&(?!lt;|quot;))*)#ie';
$magic_url_replace[] = "'\$1' . ((strlen('\$2') > 55) ? substr(str_replace('&', '&', '\$2'), 0, 39) . ' ... ' . substr(str_replace('&', '&', '\$2'), -10) : '\$2') . ''";
// matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing
- $magic_url_match[] = '#(^|[\n \]]|\()(w{3}\.[\w\-]+\.[\w\-.\~]+(?:[^[ \t\n\r<"\'\)&]+|&(?!lt;))*)#ie';
+ $magic_url_match[] = '#(^|[\n \]]|\()(w{3}\.[\w\-]+\.[\w\-.\~]+(?:[^[ \t\n\r<"\'\)&]+|&(?!lt;|quot;))*)#ie';
$magic_url_replace[] = "'\$1' . ((strlen('\$2') > 55) ? substr(str_replace('&', '&', '\$2'), 0, 39) . ' ... ' . substr(str_replace('&', '&', '\$2'), -10) : '\$2') . ''";
// matches an email@domain type address at the start of a line, or after a space or after what might be a BBCode.
@@ -1895,7 +1895,14 @@ function smiley_text($text, $force_option = false)
{
global $config, $user, $phpbb_root_path;
- return ($force_option || !$config['allow_smilies'] || !$user->optionget('viewsmilies')) ? preg_replace('#
#', '\1', $text);
+ }
+ else
+ {
+ return str_replace('
sql_query($sql);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
+ case 'mysql':
+ case 'mysql4':
+ case 'mysqli':
+
+ $sql = 'SELECT VERSION() AS mysql_version';
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
- if ($row)
- {
- $version = $row['mysql_version'];
-
- if (preg_match('#(3\.23|[45]\.)#', $version))
+ if ($row)
{
- $db_name = (preg_match('#^(?:3\.23\.(?:[6-9]|[1-9]{2}))|[45]\.#', $version)) ? "`{$db->dbname}`" : $db->dbname;
+ $version = $row['mysql_version'];
- $sql = "SHOW TABLE STATUS
- FROM " . $db_name;
- $result = $db->sql_query($sql);
-
- $dbsize = 0;
- while ($row = $db->sql_fetchrow($result))
+ if (preg_match('#(3\.23|[45]\.)#', $version))
{
- if ((isset($row['Type']) && $row['Type'] != 'MRG_MyISAM') || (isset($row['Engine']) && ($row['Engine'] == 'MyISAM' || $row['Engine'] == 'InnoDB')))
+ $db_name = (preg_match('#^(?:3\.23\.(?:[6-9]|[1-9]{2}))|[45]\.#', $version)) ? "`{$db->dbname}`" : $db->dbname;
+
+ $sql = 'SHOW TABLE STATUS
+ FROM ' . $db_name;
+ $result = $db->sql_query($sql);
+
+ $dbsize = 0;
+ while ($row = $db->sql_fetchrow($result))
{
- if ($table_prefix != '')
+ if ((isset($row['Type']) && $row['Type'] != 'MRG_MyISAM') || (isset($row['Engine']) && ($row['Engine'] == 'MyISAM' || $row['Engine'] == 'InnoDB')))
{
- if (strstr($row['Name'], $table_prefix))
+ if ($table_prefix != '')
+ {
+ if (strstr($row['Name'], $table_prefix))
+ {
+ $dbsize += $row['Data_length'] + $row['Index_length'];
+ }
+ }
+ else
{
$dbsize += $row['Data_length'] + $row['Index_length'];
}
}
- else
- {
- $dbsize += $row['Data_length'] + $row['Index_length'];
- }
}
+ $db->sql_freeresult($result);
+ }
+ else
+ {
+ $dbsize = $user->lang['NOT_AVAILABLE'];
}
- $db->sql_freeresult($result);
}
else
{
$dbsize = $user->lang['NOT_AVAILABLE'];
}
- }
- else
- {
+
+ break;
+
+ case 'mssql':
+ case 'mssql_odbc':
+
+ $sql = 'SELECT ((SUM(size) * 8.0) * 1024.0) as dbsize
+ FROM sysfiles';
+ $result = $db->sql_query($sql);
+ $dbsize = ($row = $db->sql_fetchrow($result)) ? intval($row['dbsize']) : $user->lang['NOT_AVAILABLE'];
+ $db->sql_freeresult($result);
+
+ break;
+
+ case 'postgres':
+
+ $sql = "SELECT proname
+ FROM pg_proc
+ WHERE proname = 'pg_database_size'";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row['proname'] == 'pg_database_size')
+ {
+
+ $sql = "SELECT oid
+ FROM pg_database
+ WHERE datname = '" . $db->dbname . "'";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $oid = $row['oid'];
+
+ $sql = 'SELECT pg_database_size(' . $oid . ') as size';
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $dbsize = $row['size'];
+ }
+ else
+ {
+ $dbsize = $user->lang['NOT_AVAILABLE'];
+ }
+
+ break;
+
+ default:
+
$dbsize = $user->lang['NOT_AVAILABLE'];
- }
- }
- else if (preg_match('#^mssql#', SQL_LAYER))
- {
- $sql = 'SELECT ((SUM(size) * 8.0) * 1024.0) as dbsize
- FROM sysfiles';
- $result = $db->sql_query($sql);
- $dbsize = ($row = $db->sql_fetchrow($result)) ? intval($row['dbsize']) : $user->lang['NOT_AVAILABLE'];
- $db->sql_freeresult($result);
- }
- else
- {
- $dbsize = $user->lang['NOT_AVAILABLE'];
}
if (is_int($dbsize))
diff --git a/phpBB/language/en/acp/posting.php b/phpBB/language/en/acp/posting.php
index e26400d1a4..aa6514d773 100644
--- a/phpBB/language/en/acp/posting.php
+++ b/phpBB/language/en/acp/posting.php
@@ -31,7 +31,7 @@ if (empty($lang) || !is_array($lang))
// BBCodes
// Note to translators: you can translate everything but what's between { and }
$lang = array_merge($lang, array(
- 'ACP_BBCODES_EXPLAIN' => 'BBCode is a special implementation of HTML offering greater control over what and how something is displayed. Additionnally, you can save users from typing sometimes very long HTML code by providing them a single BBCode as replacement. From this page you can add, remove and edit custom BBCodes',
+ 'ACP_BBCODES_EXPLAIN' => 'BBCode is a special implementation of HTML offering greater control over what and how something is displayed. From this page you can add, remove and edit custom BBCodes',
'ADD_BBCODE' => 'Add a new BBCode',
'BBCODE_ADDED' => 'BBCode added successfully',