r50222 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50221‎ | r50222 | r50223 >
Date:14:18, 5 May 2009
Author:tstarling
Status:deferred
Tags:
Comment:
Backports:
* r50054: fixed Special:Export link depth feature, was broken from the outset
* r50215: fix ForeignAPIFile breakage due to API change
Modified paths:
  • /branches/REL1_15/phase3 (modified) (history)
  • /branches/REL1_15/phase3/includes (modified) (history)
  • /branches/REL1_15/phase3/includes/api (modified) (history)
  • /branches/REL1_15/phase3/includes/filerepo/ForeignAPIFile.php (modified) (history)
  • /branches/REL1_15/phase3/includes/specials (modified) (history)
  • /branches/REL1_15/phase3/includes/specials/SpecialExport.php (modified) (history)

Diff [purge]

Index: branches/REL1_15/phase3/includes/filerepo/ForeignAPIFile.php
@@ -60,15 +60,22 @@
6161
6262 public function getMetadata() {
6363 if ( isset( $this->mInfo['metadata'] ) ) {
64 - $ret = array();
65 - foreach( $this->mInfo['metadata'] as $meta ) {
66 - $ret[ $meta['name'] ] = $meta['value'];
67 - }
68 - return serialize( $ret );
 64+ return serialize( self::parseMetadata( $this->mInfo['metadata'] ) );
6965 }
7066 return null;
7167 }
7268
 69+ public static function parseMetadata( $metadata ) {
 70+ if( !is_array( $metadata ) ) {
 71+ return $metadata;
 72+ }
 73+ $ret = array();
 74+ foreach( $metadata as $meta ) {
 75+ $ret[ $meta['name'] ] = self::parseMetadata( $meta['value'] );
 76+ }
 77+ return $ret;
 78+ }
 79+
7380 public function getSize() {
7481 return intval( @$this->mInfo['size'] );
7582 }
Property changes on: branches/REL1_15/phase3/includes/api
___________________________________________________________________
Name: svn:mergeinfo
7683 - /trunk/phase3/includes/api:48813-48814,48819,48836,48886,48892,48909,48989,48992,49002,49051,49068,49086,49191-49192,49212,49682,49685,49730,49775,49954,49956,49999,50041,50070,50132,50134,50169,50218
7784 + /trunk/phase3/includes/api:48813-48814,48819,48836,48886,48892,48909,48989,48992,49002,49051,49068,49086,49191-49192,49212,49682,49685,49730,49775,49954,49956,49999,50041,50054,50070,50132,50134,50169,50215,50218
Index: branches/REL1_15/phase3/includes/specials/SpecialExport.php
@@ -346,6 +346,7 @@
347347 $pageSet = $this->getLinks( $inputPages, $pageSet, 'pagelinks',
348348 array( 'pl_namespace AS namespace', 'pl_title AS title' ),
349349 array( 'page_id=pl_from' ) );
 350+ $inputPages = array_keys( $pageSet );
350351 }
351352 return $pageSet;
352353 }
Property changes on: branches/REL1_15/phase3/includes/specials
___________________________________________________________________
Name: svn:mergeinfo
353354 - /trunk/phase3/includes/specials:48836,48886,48892,48989,48992-48993,49002,49051,49068,49086,49191-49192,49212,49682,49685,49730,49775,49954,49956,49999,50041,50070,50132,50134,50169,50218
/trunk/phase3/includes/specials/specials:48993
354355 + /trunk/phase3/includes/specials:48836,48886,48892,48989,48992-48993,49002,49051,49068,49086,49191-49192,49212,49682,49685,49730,49775,49954,49956,49999,50041,50054,50070,50132,50134,50169,50215,50218
/trunk/phase3/includes/specials/specials:48993
Property changes on: branches/REL1_15/phase3/includes
___________________________________________________________________
Name: svn:mergeinfo
355356 - /trunk/phase3/includes:48836,48886,48892,48989,48992,49002,49051,49068,49086,49191-49192,49212,49682,49685,49730,49775,49954,49956,49999,50041,50070,50132,50134,50169,50218
/trunk/phase3/includes/specials:48993
356357 + /trunk/phase3/includes:48836,48886,48892,48989,48992,49002,49051,49068,49086,49191-49192,49212,49682,49685,49730,49775,49954,49956,49999,50041,50054,50070,50132,50134,50169,50215,50218
/trunk/phase3/includes/specials:48993
Property changes on: branches/REL1_15/phase3
___________________________________________________________________
Name: svn:mergeinfo
357358 - /trunk/phase3:48814,48836,48886,48892,48909,48989,48992,49002,49051,49068,49086,49191-49192,49212,49682,49685,49730,49775,49954,49956,49999,50041,50070,50132,50134,50169,50218
358359 + /trunk/phase3:48814,48836,48886,48892,48909,48989,48992,49002,49051,49068,49086,49191-49192,49212,49682,49685,49730,49775,49954,49956,49999,50041,50054,50070,50132,50134,50169,50215,50218

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r50054Make export depth > 1 actually work. :) Assuming it doesn't bomb and die usin...brion21:31, 29 April 2009
r50215Fix up r47473: descend into subarrays in ForeignAPIFile::getMetadata()catrope09:47, 5 May 2009

Status & tagging log