diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-07-06 16:46:53 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-07-06 16:46:53 +0000 |
commit | 462dc69b8e8568f4656675b31b99a31ad98e1331 (patch) | |
tree | 80887b741981fbb7ae508039ae8da66e5e918310 /phpBB/includes/functions.php | |
parent | 2b531a279f267642582b275dc3f215367e6a5396 (diff) | |
download | forums-462dc69b8e8568f4656675b31b99a31ad98e1331.tar forums-462dc69b8e8568f4656675b31b99a31ad98e1331.tar.gz forums-462dc69b8e8568f4656675b31b99a31ad98e1331.tar.bz2 forums-462dc69b8e8568f4656675b31b99a31ad98e1331.tar.xz forums-462dc69b8e8568f4656675b31b99a31ad98e1331.zip |
some bugfixes
git-svn-id: file:///svn/phpbb/trunk@6149 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 4185837917..50cdd6a121 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1202,15 +1202,12 @@ function redirect($url) { global $db, $cache, $config, $user; - if (isset($db)) + if (empty($user->lang)) { - $db->sql_close(); + $user->add_lang('common'); } - if (isset($cache)) - { - $cache->unload(); - } + garbage_collection(); // Make sure no &'s are in, this will break the redirect $url = str_replace('&', '&', $url); @@ -2341,16 +2338,8 @@ function msg_handler($errno, $msg_text, $errfile, $errline) case E_USER_ERROR: - if (isset($db)) - { - $db->sql_close(); - } + garbage_collection(); - if (isset($cache)) - { - $cache->unload(); - } - echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'; echo '<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">'; echo '<head>'; @@ -2499,7 +2488,9 @@ function page_header($page_title = '', $display_online_list = true) if (!empty($_REQUEST['f'])) { $f = request_var('f', 0); - $reading_sql = " AND s.session_page LIKE '%f=$f%'"; + + // Do not change this (it is defined as _f_={forum_id}x within session.php) + $reading_sql = " AND s.session_page LIKE '%\_f\_={$f}x%'"; } // Get number of online guests @@ -2727,6 +2718,7 @@ function page_header($page_title = '', $display_online_list = true) 'S_USER_LOGGED_IN' => ($user->data['user_id'] != ANONYMOUS) ? true : false, 'S_BOARD_DISABLED' => ($config['board_disable'] && !defined('IN_LOGIN') && $auth->acl_gets('a_', 'm_')) ? true : false, 'S_REGISTERED_USER' => $user->data['is_registered'], + 'S_IS_BOT' => $user->data['is_bot'], 'S_USER_PM_POPUP' => $user->optionget('popuppm'), 'S_USER_LANG' => $user->data['user_lang'], 'S_USER_BROWSER' => (isset($user->data['session_browser'])) ? $user->data['session_browser'] : $user->lang['UNKNOWN_BROWSER'], |