PDA

View Full Version : [Fixed] 2.3.0 Split thread retains original thread's dateline value


Paul
Sat 5th Apr '03, 8:43pm
Hi all,

I'm a bit confused about an issue we just noticed on our forums. It appears that when merging and splitting posts, the thread dateline and lastpost times are not properly updated. Is anyone else seeing this behavior? Is this by design? I haven't looked too deeply into it, but it appears that postings.php doesn't make any effort to update with the correct information and just passes on the thread information from the thread you're merging into or from the original thread you're splitting from.

Thanks,
Paul

Edit: Lastpost times are not affected. They are in fact updated via the updatethreadcount() function. Only the thread dateline is affected.

Cary
Sat 5th Apr '03, 9:08pm
I think it's by design, but you'll have to wait for a developer to confirm that.

Paul
Sat 5th Apr '03, 9:22pm
I've confirmed that vBulletin does not attempt to update the dateline of threads when using the updatethreadcount() function in admin/functions.php. I believe that this is a bug, although one that is ultimately transparent to the end user. vBulletin already queries for the needed information but leaves out the dateline when sending the UPDATE statement. The following modification will result in the expected behavior:

In admin/functions.php find:
$DB_site->query("UPDATE thread SET postusername='".addslashes($firstposter)."',postuserid='$firstposterid',lastpost='$lastpostt ime',replycount='$replies[replies]',attach='$replies[attachsum]', lastposter='".addslashes($lastposter)."' WHERE threadid='$threadid'" );
Replace it with:
// Bug fix: Give split thread correct dateline, 2003-04-05, Paul : http://www.vbulletin.com/forum/showthread.php?threadid=69042
/*
$DB_site->query("UPDATE thread SET postusername='".addslashes($firstposter)."',postuserid='$firstposterid',lastpost='$lastpostt ime',replycount='$replies[replies]',attach='$replies[attachsum]', lastposter='".addslashes($lastposter)."' WHERE threadid='$threadid'" );
*/
$firstposttime=$firstposts['dateline'];
$DB_site->query("UPDATE thread SET postusername='".addslashes($firstposter)."',postuserid='$firstposterid',dateline='$firstpost time',lastpost='$lastposttime',replycount='$replie s[replies]',attach='$replies[attachsum]', lastposter='".addslashes($lastposter)."' WHERE threadid='$threadid'" );
// End bug fix: Give split thread correct dateline
Best wishes,
Paul

Edit: It appears that extra spaces are being thrown in the query above by vB's WYSIWYG editor. There should be no spaces in SET portion of the query.

Paul
Sat 5th Apr '03, 9:51pm
A similar change will need to be made in admin/misc.php to check thread datelines for past inconsistencies in the update thread count segment.

Paul
Tue 15th Apr '03, 1:09pm
*bump*

Paul
Thu 17th Apr '03, 1:25pm
*bump*

Steve Machol
Thu 17th Apr '03, 1:54pm
I'll move this to Bugs so a Dev can look at it and it doesn't need to keep getting bumped.

Scott MacVicar
Sun 8th Jun '03, 8:46pm
fixed now.