r87723 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87722‎ | r87723 | r87724 >
Date:15:32, 9 May 2011
Author:reedy
Status:ok
Tags:
Comment:
* (bug 28870) remove action=raw from Special:SiteMatrix

Die in a fire.

Also, added version number, set at 1.1
Modified paths:
  • /trunk/extensions/SiteMatrix/SiteMatrix.php (modified) (history)
  • /trunk/extensions/SiteMatrix/SiteMatrix_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SiteMatrix/SiteMatrix.php
@@ -14,6 +14,7 @@
1515 'path' => __FILE__,
1616 'name' => 'SiteMatrix',
1717 'author' => array( 'Tim Starling', 'Brion Vibber', 'Victor Vasiliev', 'Alexandre Emsenhuber' ),
 18+ 'version' => '1.1',
1819 'url' => 'http://www.mediawiki.org/wiki/Extension:SiteMatrix',
1920 'descriptionmsg' => 'sitematrix-desc',
2021 );
Index: trunk/extensions/SiteMatrix/SiteMatrix_body.php
@@ -306,44 +306,6 @@
307307 $localLanguageNames = array();
308308 }
309309
310 - if( $wgRequest->getVal( 'action' ) == 'raw' ){
311 - $wgOut->disable();
312 - $count = $matrix->getCount();
313 - header( 'Content-Type: text/xml; charset=utf-8' );
314 - echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
315 - echo "\t<sitematrix size=\"{$count}\">\n";
316 - foreach ( $matrix->getLangList() as $lang ) {
317 - $langhost = str_replace( '_', '-', $lang );
318 - $attribs = array(
319 - 'code' => $langhost,
320 - 'name' => $langNames[$lang],
321 - );
322 - if( isset( $localLanguageNames[$lang] ) ) {
323 - $attribs['localname'] = $localLanguageNames[$lang];
324 - }
325 - echo "\t\t" . Xml::openElement( 'language', $attribs ) . "\n";
326 - foreach ( $matrix->getSites() as $site ) {
327 - if ( $matrix->exist( $lang, $site ) ) {
328 - $url = $matrix->getUrl( $lang, $site );
329 - echo "\t\t\t<site code=\"{$site}\" url=\"{$url}\" />\n";
330 - }
331 - }
332 - echo "\t\t</language>\n";
333 - }
334 - echo "\t<specials>\n";
335 - foreach ( $matrix->getSpecials() as $special ) {
336 - list( $lang, $site ) = $special;
337 - $langhost = str_replace( '_', '-', $lang );
338 - if( $site != 'wiki' ) $langhost .= $site;
339 - $url = $matrix->getUrl( $lang, $site );
340 -
341 - echo "\t\t<special code=\"{$langhost}\" url=\"{$url}\" />\n";
342 - }
343 - echo "\t</specials>\n";
344 - echo "\t</sitematrix>\n";
345 - return;
346 - }
347 -
348310 # Construct the HTML
349311
350312 # Header row

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r87200Making output of Special:SiteMatrix?action=raw much more similar to api.php?a...reedy17:55, 1 May 2011

Status & tagging log