Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/170288
Change subject: Remove dead code, tweak comments, related to JavaScript ...................................................................... Remove dead code, tweak comments, related to JavaScript * Small doc tweak to reflect it no longer uses raw script tags * Remove getOptionsAsJsString (dead) * Remove various references to $load and unreachable code that does something if it is truthy (there is no way it can be truthy). Also, part of this unreachable code calls categoryTreeExpandNode, which was removed earlier. Change-Id: Iacf681f62ffb46554243926e02176e451e5668fd --- M CategoryTreeFunctions.php 1 file changed, 1 insertion(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CategoryTree refs/changes/88/170288/1 diff --git a/CategoryTreeFunctions.php b/CategoryTreeFunctions.php index 9ed7e17..dbdfb2a 100644 --- a/CategoryTreeFunctions.php +++ b/CategoryTreeFunctions.php @@ -229,7 +229,7 @@ } /** - * Set the script tags in an OutputPage object + * Add ResourceLoader modules to the OutputPage object * @param OutputPage $outputPage */ static function setHeaders( $outputPage ) { @@ -310,14 +310,6 @@ } return $s; - } - - /** - * @param $depth null - * @return String - */ - function getOptionsAsJsString( $depth = null ) { - return Xml::escapeJsString( $this->getOptionsAsJsStructure( $depth ) ); } /** @@ -630,7 +622,6 @@ */ function renderNodeInfo( $title, $cat, $children = 0 ) { $mode = $this->getOption( 'mode' ); - $load = false; $ns = $title->getNamespace(); $key = $title->getDBkey(); @@ -716,9 +707,6 @@ $attr['class'] = 'CategoryTreeEmptyBullet'; } else { $linkattr = array( ); - if ( $load ) { - $linkattr[ 'id' ] = $load; - } $linkattr[ 'class' ] = "CategoryTreeToggle"; $linkattr['style'] = 'display: none;'; // Unhidden by JS @@ -823,14 +811,6 @@ $s .= Xml::closeElement( 'div' ); $s .= Xml::closeElement( 'div' ); - - if ( $load ) { - $s .= "\n\t\t"; - $s .= Xml::openElement( 'script', array( 'type' => 'text/javascript' ) ); - $s .= 'categoryTreeExpandNode("' . Xml::escapeJsString( $key ) . '", ' - . $this->getOptionsAsJsStructure( $children ) . ', document.getElementById("' . $load . '"));'; - $s .= Xml::closeElement( 'script' ); - } $s .= "\n\t\t"; -- To view, visit https://gerrit.wikimedia.org/r/170288 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iacf681f62ffb46554243926e02176e451e5668fd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CategoryTree Gerrit-Branch: master Gerrit-Owner: Mattflaschen <mflasc...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits