mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-19 07:41:08 +01:00
hopefully fixed "mark forums read" -> db based tracking
git-svn-id: file:///svn/phpbb/trunk@4804 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
8ab1ebd019
commit
742f5d4a18
@ -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'];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user