Quote:
Originally Posted by Boofo
Can you post the changes that need to be made for vB3 Gold?
|
Sure, but no garauntees, maybe I just got lucky.
This is the vB 3.0.0 Gold original
profile.php:
PHP Code:
// Get attachment info
$attachments = $DB_site->query("
SELECT thread.forumid, post.postid, post.threadid AS p_threadid, post.title AS p_title, post.dateline AS p_dateline, attachment.attachmentid,
thread.title AS t_title, attachment.filename, attachment.counter, attachment.filesize AS size, IF(thumbnail = '', 0, 1) AS hasthumbnail,
user.username, thread.open, attachment.userid " . iif($userid==$bbuserinfo['userid'], ", IF(attachment.postid = 0, 1, 0) AS inprogress") . "
FROM " . TABLE_PREFIX . "attachment AS attachment
LEFT JOIN " . TABLE_PREFIX . "post AS post ON (post.postid = attachment.postid)
LEFT JOIN " . TABLE_PREFIX . "thread AS thread ON (post.threadid = thread.threadid)
LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(attachment.postid = deletionlog.primaryid AND type = 'post')
LEFT JOIN " . TABLE_PREFIX . "user AS user ON (attachment.userid = user.userid)
WHERE attachment.userid = $userid
AND ((forumid IN (0$forumids) AND thread.visible = 1 AND post.visible = 1 AND deletionlog.primaryid IS NULL) " . iif($userid==$bbuserinfo['userid'], "OR attachment.postid = 0") . ")
ORDER BY attachment.attachmentid DESC
LIMIT " . ($limitlower - 1) . ", $perpage
");
And this is what I replaced it with based off of the install .txt [
profile.php]:
PHP Code:
// Get attachment info
$attachments = $DB_site->query("
SELECT thread.forumid, post.postid, post.threadid AS p_threadid, post.title AS p_title, if(post.postid,post.dateline,pmtext.dateline) AS p_dateline, attachment.attachmentid,
thread.title AS t_title, attachment.filename, attachment.counter, attachment.filesize AS size, IF(thumbnail = '', 0, 1) AS hasthumbnail,
user.username, thread.open, attachment.userid, attachment.private, pmtext.title, pm.pmid " . iif($userid==$bbuserinfo['userid'], ", IF(attachment.postid = 0, 1, 0) AS inprogress") . "
FROM " . TABLE_PREFIX . "attachment AS attachment
LEFT JOIN " . TABLE_PREFIX . "post AS post ON (post.postid = attachment.postid)
LEFT JOIN " . TABLE_PREFIX . "pmtext AS pmtext ON (pmtext.pmtextid = attachment.private)
LEFT JOIN " . TABLE_PREFIX . "pm AS pm ON (pmtext.pmtextid=pm.pmtextid AND pm.userid=$userid)
LEFT JOIN " . TABLE_PREFIX . "thread AS thread ON (post.threadid = thread.threadid)
LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(attachment.postid = deletionlog.primaryid AND type = 'post')
LEFT JOIN " . TABLE_PREFIX . "user AS user ON (attachment.userid = user.userid)
WHERE attachment.userid = $userid
AND ((forumid IN (0$forumids) AND thread.visible = 1 AND post.visible = 1 AND deletionlog.primaryid IS NULL) " . iif($userid==$bbuserinfo['userid'], "OR attachment.postid = 0") . ")
ORDER BY attachment.attachmentid DESC
LIMIT " . ($limitlower - 1) . ", $perpage
");
Before anyone goes to my site and points out that it still says RC2 - I cloned my database and am upgrading from a test location. I'm that anal/paranoid. *rolls eyes* I tested on the right version.