diff --git a/phpBB/includes/auth.php b/phpBB/includes/auth.php
index 0f51a73b0a..fe8cb16eaf 100644
--- a/phpBB/includes/auth.php
+++ b/phpBB/includes/auth.php
@@ -200,7 +200,7 @@ function auth($type, $forum_id, $userdata, $f_access = '')
{
case AUTH_ALL:
$auth_user[$key] = TRUE;
- $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users'];
+ $auth_user[$key . '_type'] = $lang['Auth_Anonymous_Users'];
break;
case AUTH_REG:
@@ -239,7 +239,7 @@ function auth($type, $forum_id, $userdata, $f_access = '')
{
case AUTH_ALL:
$auth_user[$f_forum_id][$key] = TRUE;
- $auth_user[$f_forum_id][$key . '_type'] = $lang['Auth_Anonymous_users'];
+ $auth_user[$f_forum_id][$key . '_type'] = $lang['Auth_Anonymous_Users'];
break;
case AUTH_REG:
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php
index 3fce5f4798..f2c6d7be96 100644
--- a/phpBB/includes/bbcode.php
+++ b/phpBB/includes/bbcode.php
@@ -734,34 +734,39 @@ function bbcode_array_pop(&$stack)
//
function smilies_pass($message)
{
- static $orig, $repl;
+ static $orig, $repl;
- if (!isset($orig))
- {
- global $db, $board_config;
- $orig = $repl = array();
+ if (!isset($orig))
+ {
+ global $db, $board_config;
+ $orig = $repl = array();
- $sql = 'SELECT code, smile_url FROM ' . SMILIES_TABLE;
- if( !$result = $db->sql_query($sql) )
- {
- message_die(GENERAL_ERROR, "Couldn't obtain smilies data", "", __LINE__, __FILE__, $sql);
- }
- $smilies = $db->sql_fetchrowset($result);
+ $sql = 'SELECT code, smile_url FROM ' . SMILIES_TABLE;
+ if( !$result = $db->sql_query($sql) )
+ {
+ message_die(GENERAL_ERROR, "Couldn't obtain smilies data", "", __LINE__, __FILE__, $sql);
+ }
+ $smilies = $db->sql_fetchrowset($result);
- usort($smilies, 'smiley_sort');
- for($i = 0; $i < count($smilies); $i++)
- {
- $orig[] = "/(?<=.\W|\W.|^\W)" . phpbb_preg_quote($smilies[$i]['code'], "/") . "(?=.\W|\W.|\W$)/";
- $repl[] = '';
- }
- }
+ if (count($smilies))
+ {
+ usort($smilies, 'smiley_sort');
+ }
- if (count($orig))
- {
- $message = preg_replace($orig, $repl, ' ' . $message . ' ');
- $message = substr($message, 1, -1);
- }
- return $message;
+ for ($i = 0; $i < count($smilies); $i++)
+ {
+ $orig[] = "/(?<=.\W|\W.|^\W)" . phpbb_preg_quote($smilies[$i]['code'], "/") . "(?=.\W|\W.|\W$)/";
+ $repl[] = '
';
+ }
+ }
+
+ if (count($orig))
+ {
+ $message = preg_replace($orig, $repl, ' ' . $message . ' ');
+ $message = substr($message, 1, -1);
+ }
+
+ return $message;
}
function smiley_sort($a, $b)
@@ -774,5 +779,4 @@ function smiley_sort($a, $b)
return ( strlen($a['code']) > strlen($b['code']) ) ? -1 : 1;
}
-
-?>
+?>
\ No newline at end of file
diff --git a/phpBB/includes/functions_validate.php b/phpBB/includes/functions_validate.php
index efc9cbcfd9..a1c771b351 100644
--- a/phpBB/includes/functions_validate.php
+++ b/phpBB/includes/functions_validate.php
@@ -117,7 +117,7 @@ function validate_email($email)
if ($email != '')
{
- if (preg_match('/^[a-z0-9\.\-_\+]+@[a-z0-9\-_]+\.([a-z0-9\-_]+\.)*?[a-z]+$/is', $email))
+ if (preg_match('/^[a-z0-9&.-_+]+@[a-z0-9\-_]+\.([a-z0-9\-_]+\.)*?[a-z]+$/is', $email))
{
$sql = "SELECT ban_email
FROM " . BANLIST_TABLE;
diff --git a/phpBB/install/install.php b/phpBB/install/install.php
index fa823494b0..d8866c8c33 100644
--- a/phpBB/install/install.php
+++ b/phpBB/install/install.php
@@ -99,7 +99,7 @@ function page_common_form($hidden, $submit)
?>