Index: trunk/extensions/LiquidThreads/classes/NewMessagesController.php |
— | — | @@ -108,8 +108,7 @@ |
109 | 109 | } |
110 | 110 | |
111 | 111 | private static function getRowsObject( $t ) { |
112 | | - // <= 1.15 compatibility, it kinda sucks having to do all this up here. |
113 | | - $tables = array( 'watchlist', 'user_message_state' ); |
| 112 | + $tables = array( 'watchlist', 'user_message_state', 'user_properties' ); |
114 | 113 | $joins = array( |
115 | 114 | 'user_message_state' => |
116 | 115 | array( |
— | — | @@ -118,28 +117,17 @@ |
119 | 118 | 'ums_user=wl_user', |
120 | 119 | 'ums_thread' => $t->id() |
121 | 120 | ) |
122 | | - ) |
123 | | - ); |
124 | | - $fields = array( 'wl_user', 'ums_user', 'ums_read_timestamp' ); |
125 | | - |
126 | | - global $wgVersion; |
127 | | - if ( version_compare( $wgVersion, '1.15.999', '<=' ) ) { |
128 | | - $oldPrefCompat = true; |
129 | | - |
130 | | - $tables[] = 'user'; |
131 | | - $joins['user'] = array( 'left join', 'user_id=wl_user' ); |
132 | | - $fields[] = 'user_options'; |
133 | | - } else { |
134 | | - $tables[] = 'user_properties'; |
135 | | - $joins['user_properties'] = array( |
| 121 | + ), |
| 122 | + 'user_properties' => |
| 123 | + array( |
136 | 124 | 'left join', |
137 | 125 | array( |
138 | 126 | 'up_user=wl_user', |
139 | 127 | 'up_property' => 'lqtnotifytalk', |
140 | 128 | ) |
141 | | - ); |
142 | | - $fields[] = 'up_value'; |
143 | | - } |
| 129 | + ) |
| 130 | + ); |
| 131 | + $fields = array( 'wl_user', 'ums_user', 'ums_read_timestamp', 'up_value' ); |
144 | 132 | |
145 | 133 | $dbr = wfGetDB( DB_SLAVE ); |
146 | 134 | return $dbr->select( $tables, $fields, self::getWhereClause( $t ), __METHOD__, array(), $joins ); |