Index: trunk/phase3/includes/api/ApiQueryRecentChanges.php |
— | — | @@ -437,8 +437,11 @@ |
438 | 438 | $vals['logaction'] = $row->rc_log_action; |
439 | 439 | ApiQueryLogEvents::addLogParams( |
440 | 440 | $this->getResult(), |
441 | | - $vals, $row->rc_params, |
442 | | - $row->rc_log_type, $row->rc_timestamp |
| 441 | + $vals, |
| 442 | + $row->rc_params, |
| 443 | + $row->rc_log_action, |
| 444 | + $row->rc_log_type, |
| 445 | + $row->rc_timestamp |
443 | 446 | ); |
444 | 447 | } |
445 | 448 | |
Index: trunk/phase3/includes/api/ApiQueryLogEvents.php |
— | — | @@ -198,13 +198,14 @@ |
199 | 199 | |
200 | 200 | /** |
201 | 201 | * @param $result ApiResult |
202 | | - * @param $vals |
203 | | - * @param $params |
204 | | - * @param $type |
| 202 | + * @param $vals array |
| 203 | + * @param $params string |
| 204 | + * @param $type string |
| 205 | + * @param $action string |
205 | 206 | * @param $ts |
206 | 207 | * @return array |
207 | 208 | */ |
208 | | - public static function addLogParams( $result, &$vals, $params, $type, $ts ) { |
| 209 | + public static function addLogParams( $result, &$vals, $params, $type, $action, $ts ) { |
209 | 210 | $params = explode( "\n", $params ); |
210 | 211 | switch ( $type ) { |
211 | 212 | case 'move': |
— | — | @@ -234,6 +235,9 @@ |
235 | 236 | $params = null; |
236 | 237 | break; |
237 | 238 | case 'block': |
| 239 | + if ( $action == 'unblock' ) { |
| 240 | + break; |
| 241 | + } |
238 | 242 | $vals2 = array(); |
239 | 243 | list( $vals2['duration'], $vals2['flags'] ) = $params; |
240 | 244 | |
— | — | @@ -283,8 +287,11 @@ |
284 | 288 | $vals['actionhidden'] = ''; |
285 | 289 | } else { |
286 | 290 | self::addLogParams( |
287 | | - $this->getResult(), $vals, |
288 | | - $row->log_params, $row->log_type, |
| 291 | + $this->getResult(), |
| 292 | + $vals, |
| 293 | + $row->log_params, |
| 294 | + $row->log_type, |
| 295 | + $row->log_action, |
289 | 296 | $row->log_timestamp |
290 | 297 | ); |
291 | 298 | } |
Index: trunk/phase3/includes/api/ApiQueryWatchlist.php |
— | — | @@ -306,8 +306,11 @@ |
307 | 307 | $vals['logaction'] = $row->rc_log_action; |
308 | 308 | ApiQueryLogEvents::addLogParams( |
309 | 309 | $this->getResult(), |
310 | | - $vals, $row->rc_params, |
311 | | - $row->rc_log_type, $row->rc_timestamp |
| 310 | + $vals, |
| 311 | + $row->rc_params, |
| 312 | + $row->rc_log_type, |
| 313 | + $row->rc_log_action, |
| 314 | + $row->rc_timestamp |
312 | 315 | ); |
313 | 316 | } |
314 | 317 | |