r72807 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72806‎ | r72807 | r72808 >
Date:14:26, 11 September 2010
Author:siebrand
Status:deferred
Tags:
Comment:
Fix "1051: Unknown table 'thread'" when tables use a prefix.
Modified paths:
  • /trunk/extensions/LiquidThreads/pages/NewUserMessagesView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/pages/NewUserMessagesView.php
@@ -2,7 +2,6 @@
33 if ( !defined( 'MEDIAWIKI' ) ) die;
44
55 class NewUserMessagesView extends LqtView {
6 -
76 protected $highlightedThreads;
87 protected $messagesInfo;
98
@@ -254,9 +253,11 @@
255254 }
256255
257256 function getQueryInfo() {
 257+ $dbr = wfGetDB( DB_SLAVE );
 258+
258259 $queryInfo = array(
259260 'tables' => array( 'thread', 'user_message_state' ),
260 - 'fields' => array( 'thread.*', 'ums_conversation' ),
 261+ 'fields' => array( $dbr->tableName( 'thread' ) . '.*', 'ums_conversation' ),
261262 'conds' => array(
262263 'ums_user' => $this->user->getId(),
263264 'thread_type != ' . $this->mDb->addQuotes( Threads::TYPE_DELETED ),

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r72707More or less rewrote Special:NewMessages. Only user-visible change is that it...werdna10:13, 10 September 2010

Status & tagging log