https://www.mediawiki.org/wiki/Special:Code/MediaWiki/112701
Revision: 112701
Author: reedy
Date: 2012-02-29 17:52:20 +0000 (Wed, 29 Feb 2012)
Log Message:
-----------
MFT r112700
Modified Paths:
--------------
branches/wmf/1.19wmf1/includes/api/ApiQueryLogEvents.php
Property Changed:
----------------
branches/wmf/1.19wmf1/
branches/wmf/1.19wmf1/includes/
branches/wmf/1.19wmf1/includes/api/
Property changes on: branches/wmf/1.19wmf1
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/JSTesting:100352-107913
/branches/REL1_15/phase3:51646
/branches/REL1_17/phase3:81445,81448
/branches/new-installer/phase3:43664-66004
/branches/sqlite:58211-58321
/branches/wmf/1.18wmf1:97508,111667
/trunk/phase3:111002,111029,111034,111062,111067,111076,111085,111128,111144,111251,111397,111571,111574,111597,111658,111673,111695,111697,111750,111802-111803,111827,111965-111967,112021,112034,112037,112045-112046,112049,112061-112063,112065-112066,112070-112071,112079,112100,112128,112132-112133,112141,112152,112169-112170,112172-112173,112179,112184,112259,112290,112374,112378,112381,112383,112397,112408,112474,112526,112533-112534,112563,112566
+ /branches/JSTesting:100352-107913
/branches/REL1_15/phase3:51646
/branches/REL1_17/phase3:81445,81448
/branches/new-installer/phase3:43664-66004
/branches/sqlite:58211-58321
/branches/wmf/1.18wmf1:97508,111667
/trunk/phase3:111002,111029,111034,111062,111067,111076,111085,111128,111144,111251,111397,111571,111574,111597,111658,111673,111695,111697,111750,111802-111803,111827,111965-111967,112021,112034,112037,112045-112046,112049,112061-112063,112065-112066,112070-112071,112079,112100,112128,112132-112133,112141,112152,112169-112170,112172-112173,112179,112184,112259,112290,112374,112378,112381,112383,112397,112408,112474,112526,112533-112534,112563,112566,112700
Property changes on: branches/wmf/1.19wmf1/includes
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/JSTesting/includes:100352-107913
/branches/REL1_15/phase3/includes:51646
/branches/new-installer/phase3/includes:43664-66004
/branches/sqlite/includes:58211-58321
/branches/wmf/1.18wmf1/includes:97508,111667
/branches/wmf-deployment/includes:53381
/trunk/phase3/includes:111029,111034,111067,111085,111128,111144,111251,111397,111571,111574,111597,111658,111673,111695,111697,111750,111827,111965-111967,112021,112045-112046,112049,112061-112063,112065-112066,112070-112071,112079,112128,112132-112133,112152,112184,112259,112290,112374,112378,112381,112383,112397,112408,112474,112526,112534,112563
+ /branches/JSTesting/includes:100352-107913
/branches/REL1_15/phase3/includes:51646
/branches/new-installer/phase3/includes:43664-66004
/branches/sqlite/includes:58211-58321
/branches/wmf/1.18wmf1/includes:97508,111667
/branches/wmf-deployment/includes:53381
/trunk/phase3/includes:111029,111034,111067,111085,111128,111144,111251,111397,111571,111574,111597,111658,111673,111695,111697,111750,111827,111965-111967,112021,112045-112046,112049,112061-112063,112065-112066,112070-112071,112079,112128,112132-112133,112152,112184,112259,112290,112374,112378,112381,112383,112397,112408,112474,112526,112534,112563,112700
Property changes on: branches/wmf/1.19wmf1/includes/api
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/JSTesting/includes/api:100352-107913
/branches/REL1_15/phase3/includes/api:51646
/branches/REL1_16/phase3/includes/api:63621-63636,69357
/branches/sqlite/includes/api:58211-58321
/branches/wmf/1.16wmf4/includes/api:69521
/branches/wmf/1.18wmf1/includes/api:97789,111667
/branches/wmf-deployment/includes/api:53381,59952
/trunk/phase3/includes/api:111397,111673,112290,112374,112383,112397,112408,112474
+ /branches/JSTesting/includes/api:100352-107913
/branches/REL1_15/phase3/includes/api:51646
/branches/REL1_16/phase3/includes/api:63621-63636,69357
/branches/sqlite/includes/api:58211-58321
/branches/wmf/1.16wmf4/includes/api:69521
/branches/wmf/1.18wmf1/includes/api:97789,111667
/branches/wmf-deployment/includes/api:53381,59952
/trunk/phase3/includes/api:111397,111673,112290,112374,112383,112397,112408,112474,112700
Modified: branches/wmf/1.19wmf1/includes/api/ApiQueryLogEvents.php
===================================================================
--- branches/wmf/1.19wmf1/includes/api/ApiQueryLogEvents.php 2012-02-29
17:50:02 UTC (rev 112700)
+++ branches/wmf/1.19wmf1/includes/api/ApiQueryLogEvents.php 2012-02-29
17:52:20 UTC (rev 112701)
@@ -197,27 +197,44 @@
* @param $ts
* @return array
*/
- public static function addLogParams( $result, &$vals, $params, $type,
$action, $ts ) {
+ public static function addLogParams( $result, &$vals, $params, $type,
$action, $ts, $legacy = false ) {
switch ( $type ) {
case 'move':
- if ( isset( $params[ '4::target' ] ) ) {
- $title = Title::newFromText( $params[
'4::target' ] );
+ if ( $legacy ){
+ $targetKey = 0;
+ $noredirKey = 1;
+ } else {
+ $targetKey = '4::target';
+ $noredirKey = '5::noredir';
+ }
+
+ if ( isset( $params[ $targetKey ] ) ) {
+ $title = Title::newFromText( $params[
$targetKey ] );
if ( $title ) {
$vals2 = array();
ApiQueryBase::addTitleInfo(
$vals2, $title, 'new_' );
$vals[$type] = $vals2;
}
}
- if ( isset( $params[ '5::noredir' ] ) &&
$params[ '5::noredir' ] ) {
+ if ( isset( $params[ $noredirKey ] ) &&
$params[ $noredirKey ] ) {
$vals[$type]['suppressedredirect'] = '';
}
$params = null;
break;
case 'patrol':
+ if ( $legacy ){
+ $cur = 0;
+ $prev = 1;
+ $auto = 2;
+ } else {
+ $cur = '4::curid';
+ $prev = '5::previd';
+ $auto = '6::auto';
+ }
$vals2 = array();
- $vals2[ 'cur' ] = $params[ '4::curid' ];
- $vals2[ 'prev' ] = $params[ '5::previd' ];
- $vals2[ 'auto' ] = $params[ '6::auto' ];
+ $vals2['cur'] = $params[$cur];
+ $vals2['prev'] = $params[$prev];
+ $vals2['auto'] = $params[$auto];
$vals[$type] = $vals2;
$params = null;
break;
@@ -286,7 +303,8 @@
$logEntry->getParameters(),
$logEntry->getType(),
$logEntry->getSubtype(),
- $logEntry->getTimestamp()
+ $logEntry->getTimestamp(),
+ $logEntry->isLegacy()
);
}
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs