Index: trunk/extensions/SubPageList3/SubPageList3.php |
— | — | @@ -20,10 +20,14 @@ |
21 | 21 | $wgExtensionCredits['parserhook'][] = array( |
22 | 22 | 'path' => __FILE__, |
23 | 23 | 'name' => 'Subpage List 3', |
24 | | - 'version' => '1.05', |
| 24 | + 'version' => '1.06', |
25 | 25 | 'descriptionmsg' => 'spl3-desc', |
26 | 26 | '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 | + ), |
28 | 32 | ); |
29 | 33 | |
30 | 34 | $dir = dirname(__FILE__) . '/'; |
— | — | @@ -41,9 +45,15 @@ |
42 | 46 | * Function called by the Hook, returns the wiki text |
43 | 47 | */ |
44 | 48 | 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 | + |
45 | 55 | $list = new SubpageList3( $parser ); |
46 | | - wfLoadExtensionMessages('SubPageList3'); |
47 | 56 | $list->options( $args ); |
| 57 | + |
48 | 58 | # $parser->disableCache(); |
49 | 59 | return $list->render(); |
50 | 60 | } |
— | — | @@ -496,4 +506,5 @@ |
497 | 507 | wfProfileOut( __METHOD__ ); |
498 | 508 | return $output->getText(); |
499 | 509 | } |
| 510 | + |
500 | 511 | } |