diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-04-15 14:48:36 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-04-15 14:48:36 +0000 |
commit | 84738055a25081070f570b40a19e05db21908237 (patch) | |
tree | 3bf59d91eba8d7b7b000ba5a5cd0e63e0e82b122 /phpBB/includes/functions.php | |
parent | 0562395c27cd6cafcaacd3798f6a51d8cc703c7a (diff) | |
download | forums-84738055a25081070f570b40a19e05db21908237.tar forums-84738055a25081070f570b40a19e05db21908237.tar.gz forums-84738055a25081070f570b40a19e05db21908237.tar.bz2 forums-84738055a25081070f570b40a19e05db21908237.tar.xz forums-84738055a25081070f570b40a19e05db21908237.zip |
- fixed some bugs
- made sql schemas consistent
- added correct sequences and generators to sql schemas
- extended some rows to hold more data. This solves issues with multibyte characters and too short topic titles, names, etc.
- allow multibyte characters in usernames
git-svn-id: file:///svn/phpbb/trunk@5784 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 0a6bf8d126..52e0ab7cee 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -24,10 +24,13 @@ function set_var(&$result, $var, $type, $multibyte = false) if ($type == 'string') { - $result = trim(htmlspecialchars(str_replace(array("\r\n", "\r", "\xFF"), array("\n", "\n", ' '), $result))); + $result = trim(htmlspecialchars(str_replace(array("\r\n", "\r"), array("\n", "\n"), $result))); $result = (STRIP) ? stripslashes($result) : $result; - if ($multibyte) + + // Check for possible multibyte characters to save a preg_replace call if nothing is in there... + if ($multibyte && strpos($result, '&#') !== false) { + echo "HERE"; $result = preg_replace('#&(\#[0-9]+;)#', '&\1', $result); } } @@ -1387,7 +1390,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa if (isset($_POST['login'])) { - $username = request_var('username', ''); + $username = request_var('username', '', true); $password = request_var('password', ''); $autologin = (!empty($_POST['autologin'])) ? true : false; $viewonline = (!empty($_POST['viewonline'])) ? 0 : 1; @@ -2510,7 +2513,7 @@ function page_header($page_title = '') 'L_INDEX' => $user->lang['FORUM_INDEX'], 'L_ONLINE_EXPLAIN' => $l_online_time, - 'U_PRIVATEMSGS' => "{$phpbb_root_path}ucp.$phpEx$SID&i=pm&mode=" . (($user->data['user_new_privmsg'] || $l_privmsgs_text_unread) ? 'unread' : 'view'), + 'U_PRIVATEMSGS' => "{$phpbb_root_path}ucp.$phpEx$SID&i=pm&folder=inbox", 'U_RETURN_INBOX' => "{$phpbb_root_path}ucp.$phpEx$SID&i=pm&folder=inbox", 'U_JS_RETURN_INBOX' => "{$phpbb_root_path}ucp.$phpEx$SID&i=pm&folder=inbox", 'U_POPUP_PM' => "{$phpbb_root_path}ucp.$phpEx$SID&i=pm&mode=popup", |