2012-05-17, 11:19 AM
Hi,
I have just been faced with a multiquote problem I don't know how to solve.
I check different posts on different pages of a thread for a multiquote. Looking at the post preview, the different quotes are shown in a wrong chronological order.
I do not have any plugin running, that might have an impact on quoting posts.
I tried to reproduce this behaviour at the german support forum and at mybb.com as well. However, it seems that the problem exists only at my website.....
I run version 1.6.7, with the latest PHP 5.3.13 and MySQL server 5.5.
Any help or hint how to solve this problem is very much appreciated.
Thank you.
StefanT indicated that the problem might be due to a missing ORDER BY statement.
So I changed the following lines of xmlhttp.php
The following lines of newreply.php
It seems that this solved my problem. At least so far....
I have just been faced with a multiquote problem I don't know how to solve.
I check different posts on different pages of a thread for a multiquote. Looking at the post preview, the different quotes are shown in a wrong chronological order.
I do not have any plugin running, that might have an impact on quoting posts.
I tried to reproduce this behaviour at the german support forum and at mybb.com as well. However, it seems that the problem exists only at my website.....
I run version 1.6.7, with the latest PHP 5.3.13 and MySQL server 5.5.
Any help or hint how to solve this problem is very much appreciated.
Thank you.
StefanT indicated that the problem might be due to a missing ORDER BY statement.
So I changed the following lines of xmlhttp.php
// Query for any posts in the list which are not within the specified thread
$query = $db->query("
SELECT p.subject, p.message, p.pid, p.tid, p.username, p.dateline, t.fid, p.visible, u.username AS userusername
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid)
WHERE {$from_tid}p.pid IN ($quoted_posts) {$unviewable_forums}
");
into // Query for any posts in the list which are not within the specified thread
$query = $db->query("
SELECT p.subject, p.message, p.pid, p.tid, p.username, p.dateline, t.fid, p.visible, u.username AS userusername
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid)
WHERE {$from_tid}p.pid IN ($quoted_posts) {$unviewable_forums}
ORDER BY p.dateline
");
The following lines of newreply.php
require_once MYBB_ROOT."inc/functions_posting.php";
$query = $db->query("
SELECT p.subject, p.message, p.pid, p.tid, p.username, p.dateline, u.username AS userusername
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid)
WHERE p.pid IN ($quoted_posts) {$unviewable_forums} {$visible_where}
");
have to be changed into require_once MYBB_ROOT."inc/functions_posting.php";
$query = $db->query("
SELECT p.subject, p.message, p.pid, p.tid, p.username, p.dateline, u.username AS userusername
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid)
WHERE p.pid IN ($quoted_posts) {$unviewable_forums} {$visible_where}
ORDER BY p.dateline
");
It seems that this solved my problem. At least so far....