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