From 1d37b69ddd79d9d6bc1346f3761a899d20305636 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Mon, 28 Aug 2006 15:50:33 +0000 Subject: - some bugfixes - using E_USER_WARNING if an error occurred within the ACP (sadly not able to use it as a default for trigger_error - it seems to be hardcoded in PHP) git-svn-id: file:///svn/phpbb/trunk@6320 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions.php | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 349719af57..4227a8a9a3 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1131,6 +1131,7 @@ function get_complete_topic_tracking($forum_id, $topic_ids, $global_announce_lis * @param int $f_mark_time the forums last mark time if user is registered and load_db_lastread enabled * @param int $mark_time_forum false if the mark time needs to be obtained, else the last users forum mark time * +* @return true if complete forum got marked read, else false. */ function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_time = false, $mark_time_forum = false) { @@ -1225,7 +1226,10 @@ function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_ti if (!$row) { markread('topics', $forum_id); + return true; } + + return false; } // Pagination functions @@ -2645,7 +2649,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline) case E_USER_NOTICE: define('IN_ERROR_HANDLER', true); - + if (empty($user->data)) { $user->session_begin(); @@ -2679,8 +2683,10 @@ function msg_handler($errno, $msg_text, $errfile, $errline) ); $template->assign_vars(array( - 'MESSAGE_TITLE' => $msg_title, - 'MESSAGE_TEXT' => $msg_text) + 'MESSAGE_TITLE' => $msg_title, + 'MESSAGE_TEXT' => $msg_text, + 'S_USER_WARNING' => ($errno == E_USER_WARNING) ? true : false, + 'S_USER_NOTICE' => ($errno == E_USER_NOTICE) ? true : false) ); // We do not want the cron script to be called on error messages @@ -2793,7 +2799,12 @@ function page_header($page_title = '', $display_online_list = true) { if ($row['user_colour']) { - $row['username'] = '' . $row['username'] . ''; + $user_colour = ' style="color:#' . $row['user_colour'] . '"'; + $row['username'] = '' . $row['username'] . ''; + } + else + { + $user_colour = ''; } if ($row['user_allow_viewonline'] && $row['session_viewonline']) @@ -2803,13 +2814,21 @@ function page_header($page_title = '', $display_online_list = true) } else { - $user_online_link = '' . $row['username'] . ''; + $user_online_link = '' . $row['username'] . ''; $logged_hidden_online++; } if (($row['user_allow_viewonline'] && $row['session_viewonline']) || $auth->acl_get('u_viewonline')) { - $user_online_link = ($row['user_type'] <> USER_IGNORE) ? '' . $user_online_link . '' : $user_online_link; + if ($row['user_type'] <> USER_IGNORE) + { + $user_online_link = '' . $user_online_link . ''; + } + else + { + $user_online_link = ($user_colour) ? '' . $user_online_link . '' : $user_online_link; + } + $online_userlist .= ($online_userlist != '') ? ', ' . $user_online_link : $user_online_link; } } -- cgit v1.2.1