Index: branches/wmf/1.19wmf1/includes/api/ApiQueryLogEvents.php |
— | — | @@ -198,26 +198,25 @@ |
199 | 199 | * @return array |
200 | 200 | */ |
201 | 201 | public static function addLogParams( $result, &$vals, $params, $type, $action, $ts ) { |
| 202 | + $params = explode( "\n", $params ); |
202 | 203 | switch ( $type ) { |
203 | 204 | case 'move': |
204 | | - if ( isset( $params[ '4::target' ] ) ) { |
205 | | - $title = Title::newFromText( $params[ '4::target' ] ); |
| 205 | + if ( isset( $params[0] ) ) { |
| 206 | + $title = Title::newFromText( $params[0] ); |
206 | 207 | if ( $title ) { |
207 | 208 | $vals2 = array(); |
208 | 209 | ApiQueryBase::addTitleInfo( $vals2, $title, 'new_' ); |
209 | 210 | $vals[$type] = $vals2; |
210 | 211 | } |
211 | 212 | } |
212 | | - if ( isset( $params[ '5::noredir' ] ) && $params[ '5::noredir' ] ) { |
| 213 | + if ( isset( $params[1] ) && $params[1] ) { |
213 | 214 | $vals[$type]['suppressedredirect'] = ''; |
214 | 215 | } |
215 | 216 | $params = null; |
216 | 217 | break; |
217 | 218 | case 'patrol': |
218 | 219 | $vals2 = array(); |
219 | | - $vals2[ 'cur' ] = $params[ '4::curid' ]; |
220 | | - $vals2[ 'prev' ] = $params[ '5::previd' ]; |
221 | | - $vals2[ 'auto' ] = $params[ '6::auto' ]; |
| 220 | + list( $vals2['cur'], $vals2['prev'], $vals2['auto'] ) = $params; |
222 | 221 | $vals[$type] = $vals2; |
223 | 222 | $params = null; |
224 | 223 | break; |
— | — | @@ -251,7 +250,6 @@ |
252 | 251 | } |
253 | 252 | |
254 | 253 | private function extractRowInfo( $row ) { |
255 | | - $logEntry = DatabaseLogEntry::newFromRow( $row ); |
256 | 254 | $vals = array(); |
257 | 255 | |
258 | 256 | if ( $this->fld_ids ) { |
— | — | @@ -283,10 +281,10 @@ |
284 | 282 | self::addLogParams( |
285 | 283 | $this->getResult(), |
286 | 284 | $vals, |
287 | | - $logEntry->getParameters(), |
288 | | - $logEntry->getType(), |
289 | | - $logEntry->getSubtype(), |
290 | | - $logEntry->getTimestamp() |
| 285 | + $row->log_params, |
| 286 | + $row->log_type, |
| 287 | + $row->log_action, |
| 288 | + $row->log_timestamp |
291 | 289 | ); |
292 | 290 | } |
293 | 291 | } |