if the topic is unread, it will be redirected to the last message
didnt seem to happen before
actually, it happens in every topic now, not only in unread ones
Hmmm.. it doesnt seem to be happening to me..
it has a bug
somehow, it always redirects to the last post of the thread (1 before #lastPost)
It's always worked perfectly for me.....
-[Unknown]
weird, its still happenning to me, maybe only to those with custom membergroup?
Quote from: Spaceman-Spiff on August 14, 2003, 05:34:01 PM
weird, its still happenning to me, maybe only to those with custom membergroup?
No, it's happened to me now... here:
// Find the earliest unread message in the topic.
$request = db_query("
SELECT MIN(m.ID_MSG)
FROM {$db_prefix}topics AS t, {$db_prefix}messages AS m
LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = $threadid AND lt.ID_MEMBER = $ID_MEMBER)
LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = $board AND lmr.ID_MEMBER = $ID_MEMBER)
WHERE t.ID_TOPIC = $threadid
AND m.ID_TOPIC = $threadid
AND m.posterTime > GREATEST(lt.logTime, lmr.logTime, 0)", __FILE__, __LINE__);
list ($linkMessage) = mysql_fetch_row($request);
mysql_free_result($request);
// They've read all the messages in the topic - get the last one.
if (empty($linkMessage))
{
$request = db_query("
SELECT MAX(ID_MSG)
FROM {$db_prefix}messages
WHERE ID_TOPIC = $threadid", __FILE__, __LINE__);
list ($linkMessage) = mysql_fetch_row($request);
mysql_free_result($request);
}
redirectexit('threadid=' . $threadid. ';start=msg' . $linkMessage . (isset($_REQUEST['boardseen']) ? ';boardseen' : '') . '#msg' . $linkMessage);What's wrong with that?
-[Unknown]
So the bug is that in a topic you haven't read at all yet, when you click the new image you are taken to the last post instead of the first post?
in every topic, even ones that i have read partly, when i click on the new image, it always goes to the last msg
That means that this:
if (empty($linkMessage))
Is always evaluating to true...
-[Unknown]
[Unknown], couldn't you check to see if that other (second) query is being run... or has that admin feature been removed? It could just be the first query returning something unexpected. Just a thought.
Hmmm.. very odd... maybe it's been fixed...
Here, I have the problem. On my local server... everything is fine.
-[Unknown]
maybe there's something wrong with log_mark_read?
i dont think i ever use mark read though...
I think I found the bug. Should be fixed here.