1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-28 20:40:24 +02:00

...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
This commit is contained in:
Meik Sievertsen
2005-01-02 19:06:45 +00:00
parent cf54570f6c
commit a082635b76
3 changed files with 61 additions and 10 deletions

View File

@@ -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>";
}