r81028 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81027‎ | r81028 | r81029 >
Date:16:20, 26 January 2011
Author:reedy
Status:ok
Tags:
Comment:
Remove < 1.16 back compat checks, LQT trunk is RL'd so can't work with these older versions

Essentially reapplying r70017
Modified paths:
  • /trunk/extensions/LiquidThreads/classes/NewMessagesController.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/classes/NewMessagesController.php
@@ -112,38 +112,26 @@
113113 }
114114
115115 private static function getRowsObject( $t ) {
116 - // <= 1.15 compatibility, it kinda sucks having to do all this up here.
117 - $tables = array( 'watchlist', 'user_message_state' );
 116+ $tables = array( 'watchlist', 'user_message_state', 'user_properties' );
118117 $joins = array(
119118 'user_message_state' =>
120119 array(
121 - 'left join',
 120+ 'LEFT JOIN',
122121 array(
123122 'ums_user=wl_user',
124123 'ums_thread' => $t->id()
125124 )
126 - )
127 - );
128 - $fields = array( 'wl_user', 'ums_user', 'ums_read_timestamp' );
129 -
130 - global $wgVersion;
131 - if ( version_compare( $wgVersion, '1.16', '<' ) ) {
132 - $oldPrefCompat = true;
133 -
134 - $tables[] = 'user';
135 - $joins['user'] = array( 'left join', 'user_id=wl_user' );
136 - $fields[] = 'user_options';
137 - } else {
138 - $tables[] = 'user_properties';
139 - $joins['user_properties'] = array(
140 - 'left join',
 125+ ),
 126+ 'user_properties' =>
 127+ array(
 128+ 'LEFT JOIN',
141129 array(
142130 'up_user=wl_user',
143131 'up_property' => 'lqtnotifytalk',
144132 )
145 - );
146 - $fields[] = 'up_value';
147 - }
 133+ )
 134+ );
 135+ $fields = array( 'wl_user', 'ums_user', 'ums_read_timestamp', 'up_value' );
148136
149137 $dbr = wfGetDB( DB_SLAVE );
150138 return $dbr->select( $tables, $fields, self::getWhereClause( $t ), __METHOD__, array(), $joins );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r70017Remove some pre 1.15.999 compatability stuff (1.16 is due to be released, and...reedy15:49, 27 July 2010

Status & tagging log