r63620 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63619‎ | r63620 | r63621 >
Date:23:41, 11 March 2010
Author:tstarling
Status:ok
Tags:
Comment:
MFT r62859, r62886: DB query error for installations with a table prefix.
Modified paths:
  • /branches/REL1_16/extensions/LiquidThreads/classes/NewMessagesController.php (modified) (history)

Diff [purge]

Index: branches/REL1_16/extensions/LiquidThreads/classes/NewMessagesController.php
@@ -267,25 +267,27 @@
268268 if ( version_compare( $wgVersion, '1.16', '<' ) ) {
269269 $oldPreferenceFormat = true;
270270 } else {
271 - $tables[] = 'user_properties as tc_prop';
 271+ $tableNameUserProperties = $dbr->tableName( 'user_properties' );
 272+
 273+ $tables[] = $tableNameUserProperties . ' as tc_prop';
272274 $fields[] = 'tc_prop.up_value as timecorrection';
273275
274 - $join_conds['user_properties as tc_prop'] = array(
 276+ $join_conds[$tableNameUserProperties . ' as tc_prop'] = array(
275277 'left join',
276278 array(
277 - 'up_user=user_id',
278 - 'up_property' => 'timecorrection',
 279+ 'tc_prop.up_user=user_id',
 280+ 'tc_prop.up_property' => 'timecorrection',
279281 )
280282 );
281283
282 - $tables[] = 'user_properties as l_prop';
 284+ $tables[] = $tableNameUserProperties . ' as l_prop';
283285 $fields[] = 'l_prop.up_value as language';
284286
285 - $join_conds['user_properties as l_prop'] = array(
 287+ $join_conds[$tableNameUserProperties . ' as l_prop'] = array(
286288 'left join',
287289 array(
288 - 'up_user=user_id',
289 - 'up_property' => 'language',
 290+ 'l_prop.up_user=user_id',
 291+ 'l_prop.up_property' => 'language',
290292 )
291293 );
292294 }
Property changes on: branches/REL1_16/extensions/LiquidThreads/classes/NewMessagesController.php
___________________________________________________________________
Name: svn:mergeinfo
293295 + /trunk/extensions/LiquidThreads/classes/NewMessagesController.php:57390,62859,62886

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r62859Fix database error (hopefully). Needs review (also because NewMessages::write...siebrand00:08, 23 February 2010
r62886Follow-up to r62859: trying to fix Error: 1052 Column 'up_user' in on clause ...siebrand18:40, 23 February 2010

Status & tagging log