r79124 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79123‎ | r79124 | r79125 >
Date:18:48, 28 December 2010
Author:jeroendedauw
Status:resolved (Comments)
Tags:
Comment:
Small improvement
Modified paths:
  • /trunk/extensions/SubPageList3/SubPageList3.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SubPageList3/SubPageList3.php
@@ -20,10 +20,14 @@
2121 $wgExtensionCredits['parserhook'][] = array(
2222 'path' => __FILE__,
2323 'name' => 'Subpage List 3',
24 - 'version' => '1.05',
 24+ 'version' => '1.06',
2525 'descriptionmsg' => 'spl3-desc',
2626 'url' => 'http://www.mediawiki.org/wiki/Extension:SubPageList3',
27 - 'author' => array('James McCormack', 'Martin Schallnahs', 'Rob Church'),
 27+ 'author' => array(
 28+ 'James McCormack',
 29+ 'Martin Schallnahs',
 30+ 'Rob Church'
 31+ ),
2832 );
2933
3034 $dir = dirname(__FILE__) . '/';
@@ -41,9 +45,15 @@
4246 * Function called by the Hook, returns the wiki text
4347 */
4448 function efRenderSubpageList3( $input, $args, $parser ) {
 49+ // This function has been deprecated in 1.16, but needed for earlier versions.
 50+ // It's present in 1.16 as a stub, but lets check if it exists in case it gets removed at some point.
 51+ if ( version_compare( $wgVersion, '1.15', '<=' ) ) {
 52+ wfLoadExtensionMessages( 'SubPageList3' );
 53+ }
 54+
4555 $list = new SubpageList3( $parser );
46 - wfLoadExtensionMessages('SubPageList3');
4756 $list->options( $args );
 57+
4858 # $parser->disableCache();
4959 return $list->render();
5060 }
@@ -496,4 +506,5 @@
497507 wfProfileOut( __METHOD__ );
498508 return $output->getText();
499509 }
 510+
500511 }

Comments

#Comment by Tim Starling (talk | contribs)   06:52, 23 June 2011

The missing "global $wgVersion" was added in r81220, which was before the next branch point. Marking resolved.

Status & tagging log