Index: trunk/extensions/LiquidThreads/classes/NewMessagesController.php |
— | — | @@ -112,38 +112,26 @@ |
113 | 113 | } |
114 | 114 | |
115 | 115 | 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' ); |
118 | 117 | $joins = array( |
119 | 118 | 'user_message_state' => |
120 | 119 | array( |
121 | | - 'left join', |
| 120 | + 'LEFT JOIN', |
122 | 121 | array( |
123 | 122 | 'ums_user=wl_user', |
124 | 123 | 'ums_thread' => $t->id() |
125 | 124 | ) |
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', |
141 | 129 | array( |
142 | 130 | 'up_user=wl_user', |
143 | 131 | 'up_property' => 'lqtnotifytalk', |
144 | 132 | ) |
145 | | - ); |
146 | | - $fields[] = 'up_value'; |
147 | | - } |
| 133 | + ) |
| 134 | + ); |
| 135 | + $fields = array( 'wl_user', 'ums_user', 'ums_read_timestamp', 'up_value' ); |
148 | 136 | |
149 | 137 | $dbr = wfGetDB( DB_SLAVE ); |
150 | 138 | return $dbr->select( $tables, $fields, self::getWhereClause( $t ), __METHOD__, array(), $joins ); |