r99214 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99213‎ | r99214 | r99215 >
Date:14:23, 7 October 2011
Author:siebrand
Status:ok
Tags:
Comment:
Follow-up r98191:
* remove unneeded wfLoadExtensionMessages() call.
* added two FIXMEs.
* simplify extension description
* simplify 'apiexplorer-intro'
Modified paths:
  • /trunk/extensions/ApiExplorer/ApiExplorer.i18n.php (modified) (history)
  • /trunk/extensions/ApiExplorer/SpecialApiExplorer.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ApiExplorer/SpecialApiExplorer.php
@@ -25,7 +25,9 @@
2626
2727 $dir = dirname( __FILE__ ) . '/';
2828 $wgExtensionMessagesFiles['ApiExplorer'] = $dir . 'ApiExplorer.i18n.php';
 29+// @todo FIXME: Special pages need an aliases file for i18n of special page names.
2930
 31+// @todo FIXME: Should be in a class and be added from $wgSpecialPages.
3032 function wfSpecialApiExplorer () {
3133 global $IP;
3234 require_once "$IP/includes/SpecialPage.php";
@@ -48,8 +50,6 @@
4951 global $wgOut, $wgExtensionsPath, $wgCityId, $wgStyleVersion;
5052 wfProfileIn( __METHOD__ );
5153
52 - wfLoadExtensionMessages( "AutoCreateWiki" ); // TODO: This isn't needed anymore, even in Wikia code (which is 2 versions back at the moment), is it?
53 -
5454 // TODO: Make this work for ResourceLoader (Wikia isn't using RL yet at the time of this writing).
5555 // Wikia has the cachebuster in the wgExtensionPath (we rewrite that in varnish because many proxies won't cache things that have "?" in the URL), but other MediaWikis need the style-version in the querystring.
5656 $cbSuffix = ( isset( $wgCityId ) ? "?{$wgStyleVersion}" : "" );
@@ -77,7 +77,7 @@
7878 }
7979 </style>
8080 <div id='apEx_intro'>
81 - <?= wfMsg('apiexplorer-intro', "<a href='http://www.mediawiki.org/wiki/API:Main_page'>http://www.mediawiki.org/wiki/API:Main_page</a>") ?>
 81+ <?= wfMsg('apiexplorer-intro') ?>
8282 </div>
8383 <div id='apEx_loading'><?= wfMsg('apiexplorer-loading') ?></div>
8484 <div id='apEx'>
Index: trunk/extensions/ApiExplorer/ApiExplorer.i18n.php
@@ -12,8 +12,8 @@
1313 */
1414 $messages['en'] = array(
1515 'apiexplorer' => 'API Explorer',
16 - 'apiexplorer-desc' => 'Page for interactively exploring the documentation of the live version of the MediaWiki API running on this installation.',
17 - 'apiexplorer-intro' => "This page shows documentation for the current wiki's API. Please click on a function below to see more info about what parameters can be used in each call. For the general MediaWiki API documentation, see $1",
 16+ 'apiexplorer-desc' => 'Page for interactively exploring the documentation of the MediaWiki API',
 17+ 'apiexplorer-intro' => "This page shows documentation for the current wiki's API. Please click on a function below to see more info about what parameters can be used in each call. Also see [http://www.mediawiki.org/wiki/API:Main_page the general MediaWiki API documentation].",
1818
1919 'apiexplorer-loading' => 'Loading functions...',
2020 );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r98191Adding ApiExplorer extension which uses the API to dynamically generate API d...sean_colombo22:50, 26 September 2011

Status & tagging log