Index: trunk/extensions/LiquidThreads/classes/NewMessagesController.php |
— | — | @@ -70,8 +70,7 @@ |
71 | 71 | } else { |
72 | 72 | throw new MWException( "writeUserMessageState expected User or integer but got $user" ); |
73 | 73 | } |
74 | | - |
75 | | - |
| 74 | + |
76 | 75 | $conversation = Threads::withId($thread_id)->topmostThread()->id(); |
77 | 76 | |
78 | 77 | $dbw = wfGetDB( DB_MASTER ); |
— | — | @@ -245,14 +244,14 @@ |
246 | 245 | } |
247 | 246 | |
248 | 247 | // Send email notification, fetching all the data in one go |
249 | | - $tableNameUserProperties = $dbr->tableName( 'user_properties' ); |
| 248 | + $dbr = wfGetDB( DB_SLAVE ); |
250 | 249 | |
251 | 250 | $tables = array( |
252 | 251 | 'user', |
253 | | - $tableNameUserProperties . ' AS tc_prop', |
254 | | - $tableNameUserProperties . ' AS l_prop' |
| 252 | + 'tc_prop' => 'user_properties', |
| 253 | + 'l_prop' => 'user_properties' |
255 | 254 | ); |
256 | | - $dbr = wfGetDB( DB_SLAVE ); |
| 255 | + |
257 | 256 | $fields = array( |
258 | 257 | $dbr->tableName( 'user' ) . '.*', |
259 | 258 | 'tc_prop.up_value AS timecorrection', |
— | — | @@ -260,14 +259,14 @@ |
261 | 260 | ); |
262 | 261 | |
263 | 262 | $join_conds = array( |
264 | | - $tableNameUserProperties . ' AS tc_prop' => array( |
| 263 | + 'tc_prop' => array( |
265 | 264 | 'LEFT JOIN', |
266 | 265 | array( |
267 | 266 | 'tc_prop.up_user=user_id', |
268 | 267 | 'tc_prop.up_property' => 'timecorrection', |
269 | 268 | ) |
270 | 269 | ), |
271 | | - $tableNameUserProperties . ' AS l_prop' => array( |
| 270 | + 'l_prop' => array( |
272 | 271 | 'LEFT JOIN', |
273 | 272 | array( |
274 | 273 | 'l_prop.up_user=user_id', |