Re: topicseen, I really don't think it's a legacy thing... Its main use is in Display.php, things like this:
// Have we recently cached the number of new topics in this board, and it's still a lot?
if (isset($_REQUEST['topicseen'], $_SESSION['topicseen_cache'][$board]) && $_SESSION['topicseen_cache'][$board] > 5)
$_SESSION['topicseen_cache'][$board]--;The idea really seems to be about saving extra work for the server.
Re: the option, it will go away then
:) Adding to my to do list.
Re: pm_notify, I'm pretty sure my local install is vanilla with respect to that setting, and I can assure you PM notification is disabled for me. Maybe it's because I don't have a mail server on my machine, and Wedge saw it and disabled the feature...? I don't know.
Ahhh, can't bother to look into it now...
:(Another thing now. While looking into topicseen and other things, I noticed a VERY strange thing on my local install and its single topic (sigh). When posting a new message, I'd be brought to the second-to-last message instead. After looking into it, I found a SMF bug. I can reproduce it here.
One of my posts in the topic is actually unapproved (so I can check on styling unapproved posts.) The COUNT that generates $context[start_from] from start=new takes care of that by removing all unapproved posts from the post count, but then... In the meantime, Wedge meets this piece of nasty code:
// Go to the last message if the given time is beyond the time of the last message.
if (isset($context['start_from']) && $context['start_from'] >= $topicinfo['num_replies'])
$context['start_from'] = $topicinfo['num_replies'];At this point, $context['start_from'] is 20 (according to COUNT(*)) if I have an unapproved post and 19 if I don't.
And $topicinfo['num_replies'] is 18 if I have an unapproved post, and 19 if I don't.
So, no unapproved post = it works.
Unapproved post(s) = it gets reset to < 19 and voilà, the bug happens.
IIRC, num_replies caches the number of actual visible posts for everyone, so it won't take unapproved posts into account, hence the bug. I unapproved a post of mine here and tried /new/#new and was redirected to the second-to-last post, again.
Any suggestions as to how we should fix this...?
I just tried again (posting 2 messages as an 'approvable' account and then logging in as admin, approving the last one...) Did the /new/, and I got redirected to the second-to-last post, i.e. the unapproved one. So it's definitely something that can be reproduced.
- Oh, and a bonus bug... Apparently, when the very last post in a topic is unapproved, the topic won't show up at all on the Message Index. It just shows nothing...
:-/ I have to go to the mod area and then follow the link to the unapproved posts.
Funtastic. Today is bug day -- also found YET another bug in IE with white-space crap... Breaks the entire layout in certain conditions.
:-/ Spent an hour on this, couldn't find a way to fix.