http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88494
Revision: 88494
Author: reedy
Date: 2011-05-20 22:01:50 +0000 (Fri, 20 May 2011)
Log Message:
-----------
* (bug 29063) When viewing list=recentchanges&rcprop=loginfo for an unblock
entry, get undefined index
Unblocks have no params, so skip adding info
Modified Paths:
--------------
trunk/phase3/includes/api/ApiQueryLogEvents.php
trunk/phase3/includes/api/ApiQueryRecentChanges.php
trunk/phase3/includes/api/ApiQueryWatchlist.php
Modified: trunk/phase3/includes/api/ApiQueryLogEvents.php
===================================================================
--- trunk/phase3/includes/api/ApiQueryLogEvents.php 2011-05-20 21:47:38 UTC
(rev 88493)
+++ trunk/phase3/includes/api/ApiQueryLogEvents.php 2011-05-20 22:01:50 UTC
(rev 88494)
@@ -198,13 +198,14 @@
/**
* @param $result ApiResult
- * @param $vals
- * @param $params
- * @param $type
+ * @param $vals array
+ * @param $params string
+ * @param $type string
+ * @param $action string
* @param $ts
* @return array
*/
- public static function addLogParams( $result, &$vals, $params, $type,
$ts ) {
+ public static function addLogParams( $result, &$vals, $params, $type,
$action, $ts ) {
$params = explode( "\n", $params );
switch ( $type ) {
case 'move':
@@ -234,6 +235,9 @@
$params = null;
break;
case 'block':
+ if ( $action == 'unblock' ) {
+ break;
+ }
$vals2 = array();
list( $vals2['duration'], $vals2['flags'] ) =
$params;
@@ -283,8 +287,11 @@
$vals['actionhidden'] = '';
} else {
self::addLogParams(
- $this->getResult(), $vals,
- $row->log_params, $row->log_type,
+ $this->getResult(),
+ $vals,
+ $row->log_params,
+ $row->log_type,
+ $row->log_action,
$row->log_timestamp
);
}
Modified: trunk/phase3/includes/api/ApiQueryRecentChanges.php
===================================================================
--- trunk/phase3/includes/api/ApiQueryRecentChanges.php 2011-05-20 21:47:38 UTC
(rev 88493)
+++ trunk/phase3/includes/api/ApiQueryRecentChanges.php 2011-05-20 22:01:50 UTC
(rev 88494)
@@ -437,8 +437,11 @@
$vals['logaction'] = $row->rc_log_action;
ApiQueryLogEvents::addLogParams(
$this->getResult(),
- $vals, $row->rc_params,
- $row->rc_log_type, $row->rc_timestamp
+ $vals,
+ $row->rc_params,
+ $row->rc_log_action,
+ $row->rc_log_type,
+ $row->rc_timestamp
);
}
Modified: trunk/phase3/includes/api/ApiQueryWatchlist.php
===================================================================
--- trunk/phase3/includes/api/ApiQueryWatchlist.php 2011-05-20 21:47:38 UTC
(rev 88493)
+++ trunk/phase3/includes/api/ApiQueryWatchlist.php 2011-05-20 22:01:50 UTC
(rev 88494)
@@ -306,8 +306,11 @@
$vals['logaction'] = $row->rc_log_action;
ApiQueryLogEvents::addLogParams(
$this->getResult(),
- $vals, $row->rc_params,
- $row->rc_log_type, $row->rc_timestamp
+ $vals,
+ $row->rc_params,
+ $row->rc_log_type,
+ $row->rc_log_action,
+ $row->rc_timestamp
);
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs