diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2005-01-02 19:06:45 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2005-01-02 19:06:45 +0000 |
commit | a082635b76b6191eeb717ef5d00f0ca86d038a01 (patch) | |
tree | fab82b56b0defcbb6f04e4601013609fa4799e21 /phpBB/includes/functions.php | |
parent | cf54570f6c3ad03065df9ff18a57cac145305443 (diff) | |
download | forums-a082635b76b6191eeb717ef5d00f0ca86d038a01.tar forums-a082635b76b6191eeb717ef5d00f0ca86d038a01.tar.gz forums-a082635b76b6191eeb717ef5d00f0ca86d038a01.tar.bz2 forums-a082635b76b6191eeb717ef5d00f0ca86d038a01.tar.xz forums-a082635b76b6191eeb717ef5d00f0ca86d038a01.zip |
...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
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 14 |
1 files changed, 12 insertions, 2 deletions
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 "<b>PHP Notice</b>: in file <b>$errfile</b> on line <b>$errline</b>: <b>$msg_text</b><br>"; } |