diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2004-02-07 10:48:35 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2004-02-07 10:48:35 +0000 |
commit | 742f5d4a18ff113a47324beb1b9233f305e296be (patch) | |
tree | 6918ed7e1fb417996230e6d965807b0d10da3a4a /phpBB/includes/functions.php | |
parent | 8ab1ebd01967367df7607688e7d2fd5b4e24ba7e (diff) | |
download | forums-742f5d4a18ff113a47324beb1b9233f305e296be.tar forums-742f5d4a18ff113a47324beb1b9233f305e296be.tar.gz forums-742f5d4a18ff113a47324beb1b9233f305e296be.tar.bz2 forums-742f5d4a18ff113a47324beb1b9233f305e296be.tar.xz forums-742f5d4a18ff113a47324beb1b9233f305e296be.zip |
hopefully fixed "mark forums read" -> db based tracking
git-svn-id: file:///svn/phpbb/trunk@4804 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index fb1081bb66..4390b1be36 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -542,16 +542,16 @@ function markread($mode, $forum_id = 0, $topic_id = 0, $marktime = false) case 'mark': if ($config['load_db_lastread']) { - $sql_where = (is_array($forum_id)) ? ' IN (' . implode(', ', $forum_id) . ')' : " = $forum_id"; + $sql_where = (is_array($forum_id)) ? ' IN (' . implode(', ', array_map('intval', $forum_id)) . ')' : ' = ' . (int) $forum_id; $sql = 'SELECT forum_id FROM ' . FORUMS_TRACK_TABLE . ' WHERE user_id = ' . $user->data['user_id'] . " AND forum_id $sql_where"; $result = $db->sql_query($sql); - + $sql_update = array(); - if ($row = $db->sql_fetchrow($result)) + while ($row = $db->sql_fetchrow($result)) { $sql_update[] = $row['forum_id']; } |