r108410 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108409‎ | r108410 | r108411 >
Date:13:41, 9 January 2012
Author:nad
Status:ok
Tags:
Comment:
revert back to 1.2.4 (not working with resourceLoader) but keep removal of legacy comment format
Modified paths:
  • /trunk/extensions/TreeAndMenu/TreeAndMenu.php (modified) (history)

Diff [purge]

Index: trunk/extensions/TreeAndMenu/TreeAndMenu.php
@@ -14,7 +14,7 @@
1515
1616 if( !defined( 'MEDIAWIKI' ) ) die( 'Not an entry point.' );
1717
18 -define( 'TREEANDMENU_VERSION','1.3.0, 2012-01-08' );
 18+define( 'TREEANDMENU_VERSION','1.2.4, 2012-01-09' );
1919
2020 // Set any unset images to default titles
2121 if( !isset( $wgTreeViewImages ) || !is_array( $wgTreeViewImages ) ) $wgTreeViewImages = array();
@@ -29,8 +29,10 @@
3030 'path' => __FILE__,
3131 'name' => 'TreeAndMenu',
3232 'author' => array( '[http://www.organicdesign.co.nz/User:Nad Nad]', '[http://www.organicdesign.co.nz/User:Sven Sven]' ),
33 - 'url' => 'https://www.mediawiki.org/wiki/Extension:TreeAndMenu',
34 - 'descriptionmsg' => 'treeandmenu-desc',
 33+ 'url' => 'http://www.mediawiki.org/wiki/Extension:TreeAndMenu',
 34+ 'description' => 'Adds #tree and #menu parser functions which contain bullet-lists to be rendered as collapsible treeview\'s or dropdown menus.
 35+ The treeview\'s use the [http://www.destroydrop.com/javascripts/tree dTree] JavaScript tree menu,
 36+ and the dropdown menu\'s use [http://www.htmldog.com/articles/suckerfish/dropdowns/ Son of Suckerfish]',
3537 'version' => TREEANDMENU_VERSION
3638 );
3739
@@ -138,7 +140,7 @@
139141 * Called after parser has finished (ParserAfterTidy) so all transcluded parts can be assembled into final trees
140142 */
141143 public function renderTreeAndMenu( &$parser, &$text ) {
142 - global $wgJsMimeType, $wgOut, $wgVersion;
 144+ global $wgJsMimeType, $wgOut;
143145 $u = $this->uniq;
144146
145147 // Determine which trees are sub trees
@@ -232,9 +234,6 @@
233235 document.getElementById('$id').innerHTML = $objid.toString();
234236 $opennodesjs";
235237
236 - // If MediaWiki version 1.16+ bind the script to jQuery's ready hook
237 - if( version_compare( $wgVersion, '1.16.0' ) >= 0 ) $script = "jQuery( function() { $script } );";
238 -
239238 // Embed the script into the output
240239 $html = "$top<div class='$class' id='$id'>$dTreeScript<script type=\"$wgJsMimeType\">/*<![CDATA[*/
241240 // TreeAndMenu-{$this->version}

Status & tagging log