PDA

View Full Version : [fixed] When moving thread from a forum, the last post isn't correct



Chen
Mon 24th Sep '01, 4:29pm
I noticed this happened many times here before, but I could never really put my finger on what's causing it.

Every once in a while, the last post colum for the Hacks forum flips out, and displays a time from earlier that day.

And it just happened again!

And I think I found out what's causing this.
wluke just moved a thread, something about removing the mods colum from the forum listings, from the Releases forum to the Templates forum.

I could be wrong, I still hasn't got the time to look at the code, but I think that when you move a thread from a forum that has children OR from a forum that is a children, the last post info for the parent forum only updates with the posts of that forum and NOT checking if there are new posts in its children forums.

I posted this quickly so maybe someone can see this and confirm, right now the last post of the Hacks forum (on the main page) reads:

09-24-2001 05:38 PM
by snyx
And that's not correct.

Chen
Mon 24th Sep '01, 4:41pm
Ok, I think I'm right.

In functions.php, the function updateforumcount.
You create the full forum list, include children and all, but never use it.

This:

$lastposts=$DB_site->query_first("SELECT MAX(lastpost) AS lastpost FROM thread WHERE forumid=$forumid AND visible=1 AND open<>10");
should be:

$lastposts=$DB_site->query_first("SELECT MAX(lastpost) AS lastpost FROM thread WHERE forumid IN ($forumid $forumslist) AND visible=1 AND open<>10");
And also this:

if ($numpost=$DB_site->query_first("SELECT COUNT(*) AS threads,SUM(replycount) AS replies FROM thread WHERE forumid=$forumid AND visible=1 AND open<>10")) {
should be:

if ($numpost=$DB_site->query_first("SELECT COUNT(*) AS threads,SUM(replycount) AS replies FROM thread WHERE forumid IN ($forumid $forumslist) AND visible=1 AND open<>10")) {

Right? :confused:

tubedogg
Mon 24th Sep '01, 5:08pm
http://www.vbulletin.com/forum/showthread.php?s=&threadid=27135

Chen
Mon 24th Sep '01, 5:14pm
Heh, ok. :)

c-prompt
Mon 24th Sep '01, 7:43pm
Me thinks FireFly is c00l.


lol

Chen
Tue 25th Sep '01, 10:06am
What a bright little fella. ;)

Faruk
Tue 25th Sep '01, 12:17pm
Originally posted by c-prompt
Me thinks FireFly is c00l.


lol


Me agrees with c-prompt. FireFly = Teh Man! :)

So like, vB developers, I take it this will be fixed in the next update of vB? :)

tubedogg
Tue 25th Sep '01, 3:55pm
Originally posted by 1337Devil
So like, vB developers, I take it this will be fixed in the next update of vB? :)No. We plan to leave it as a bug until someone actually shows up at John's doorstep demanding it be fixed.

eva2000
Tue 25th Sep '01, 4:13pm
Originally posted by tubedogg
No. We plan to leave it as a bug until someone actually shows up at John's doorstep demanding it be fixed. :eek: :D

Chen
Tue 25th Sep '01, 4:18pm
So who's gonna pay for my ticket? :D

Faruk
Wed 26th Sep '01, 4:45am
Originally posted by tubedogg
No. We plan to leave it as a bug until someone actually shows up at John's doorstep demanding it be fixed.

W3rd! Let's make us sorry bastards put effort into letting our boards work properly!


:D

John
Mon 22nd Oct '01, 5:51pm
*bump*

Nicholas Brown
Mon 22nd Oct '01, 6:06pm
*pointless post count increaser and also bumper for john ;)*

John
Thu 25th Oct '01, 4:10pm
Not quite fixed yet...working on it :)

John

John
Thu 25th Oct '01, 5:04pm
Fixed now, although had to undo a few optimisations :( Still looking for a better fix...

John