r87200 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87199‎ | r87200 | r87201 >
Date:17:55, 1 May 2011
Author:reedy
Status:deferred (Comments)
Tags:
Comment:
Making output of Special:SiteMatrix?action=raw much more similar to api.php?action=sitematrix

* (bug 14955) Illogical XML in sitematrix API output
Modified paths:
  • /trunk/extensions/SiteMatrix/SiteMatrix_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SiteMatrix/SiteMatrix_body.php
@@ -302,8 +302,7 @@
303303 $count = $matrix->getCount();
304304 header( 'Content-Type: text/xml; charset=utf-8' );
305305 echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
306 - echo "<sitematrix>\n";
307 - echo "\t<matrix size=\"{$count}\">\n";
 306+ echo "\t<sitematrix size=\"{$count}\">\n";
308307 foreach ( $matrix->getLangList() as $lang ) {
309308 $langhost = str_replace( '_', '-', $lang );
310309 $attribs = array(
@@ -322,7 +321,6 @@
323322 }
324323 echo "\t\t</language>\n";
325324 }
326 - echo "\t</matrix>\n";
327325 echo "\t<specials>\n";
328326 foreach ( $matrix->getSpecials() as $special ) {
329327 list( $lang, $site ) = $special;
@@ -333,7 +331,7 @@
334332 echo "\t\t<special code=\"{$langhost}\" url=\"{$url}\" />\n";
335333 }
336334 echo "\t</specials>\n";
337 - echo "</sitematrix>";
 335+ echo "\t</sitematrix>\n";
338336 return;
339337 }
340338

Follow-up revisions

RevisionCommit summaryAuthorDate
r87723* (bug 28870) remove action=raw from Special:SiteMatrix...reedy15:32, 9 May 2011

Comments

#Comment by Bryan (talk | contribs)   12:12, 15 May 2011

Can't we just kill action=raw?

#Comment by Reedy (talk | contribs)   12:17, 15 May 2011

Possibly, I'd imagine Chad would agree

But this would still need doing anyway ;)

#Comment by Reedy (talk | contribs)   12:17, 15 May 2011

Wait, didn't I kill raw for SiteMatrix?

Status & tagging log