From a082635b76b6191eeb717ef5d00f0ca86d038a01 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 2 Jan 2005 19:06:45 +0000 Subject: ...see if i am able to break the cookie tracking system this time. :D - made some session code updates - added new acl function (might be helpful later) git-svn-id: file:///svn/phpbb/trunk@5038 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 8d3965d8d5..cc9e855550 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -687,6 +687,11 @@ function markread($mode, $forum_id = 0, $topic_id = 0, $marktime = false) $type = TRACK_POSTED; case 'topic': + if (!isset($type)) + { + $type = TRACK_NORMAL; + } + $forum_id = (int) $forum_id[0]; // Mark a topic as read @@ -735,12 +740,17 @@ function markread($mode, $forum_id = 0, $topic_id = 0, $marktime = false) } } - if (base_convert($tracking[$forum_id][0], 36, 10) < $current_time) + if (isset($tracking[$forum_id]) && base_convert($tracking[$forum_id][0], 36, 10) < $current_time) { $tracking[$forum_id][base_convert($topic_id, 10, 36)] = base_convert($current_time - $config['board_startdate'], 10, 36); $user->set_cookie('track', serialize($tracking), time() + 31536000); } + else if (!isset($tracking[$forum_id])) + { + $tracking[$forum_id][0] = base_convert($current_time - $config['board_startdate'], 10, 36); + $user->set_cookie('track', serialize($tracking), time() + 31536000); + } unset($tracking); } break; @@ -1389,7 +1399,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline) if (defined('DEBUG_EXTRA')) { // Remove me - if (!strstr($errfile, '/cache/') && !strstr($errfile, 'template.php')) + if (!strstr($errfile, 'cache') && !strstr($errfile, 'template.php')) { echo "PHP Notice: in file $errfile on line $errline: $msg_text
"; } -- cgit v1.2.1