From: Alexandre Emsenhuber Date: Sat, 12 Dec 2009 15:34:23 +0000 (+0000) Subject: * (bug 21826) Subsections of Special:Version now also have anchors X-Git-Tag: 1.31.0-rc.0~38559 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/recherche.php?a=commitdiff_plain;h=4aa85543b9e1a3e0d79494a3c6d1bbf1fce8627d;p=lhc%2Fweb%2Fwiklou.git * (bug 21826) Subsections of Special:Version now also have anchors --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 2ca7e948ff..45d7384baa 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -296,6 +296,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * $wgTexvcBackgroundColor contains background color for texvc call * (bug 21574) Redirects can now have "303 See Other" HTTP status * EditPage refactored to allow extensions to derive new edit modes much easier. +* (bug 21826) Subsections of Special:Version now also have anchors === Bug fixes in 1.16 === diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index 94622a02f3..eebbeaab8e 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -197,7 +197,7 @@ class SpecialVersion extends SpecialPage { foreach ( $extensionTypes as $type => $text ) { if ( isset ( $wgExtensionCredits[$type] ) && count ( $wgExtensionCredits[$type] ) ) { - $out .= $this->openExtType( $text ); + $out .= $this->openExtType( $text, 'credits-' . $type ); usort( $wgExtensionCredits[$type], array( $this, 'compare' ) ); @@ -208,24 +208,24 @@ class SpecialVersion extends SpecialPage { } if ( count( $wgExtensionFunctions ) ) { - $out .= $this->openExtType( wfMsg( 'version-extension-functions' ) ); + $out .= $this->openExtType( wfMsg( 'version-extension-functions' ), 'extension-functions' ); $out .= '' . $this->listToText( $wgExtensionFunctions ) . "\n"; } if ( $cnt = count( $tags = $wgParser->getTags() ) ) { for ( $i = 0; $i < $cnt; ++$i ) $tags[$i] = "<{$tags[$i]}>"; - $out .= $this->openExtType( wfMsg( 'version-parser-extensiontags' ) ); + $out .= $this->openExtType( wfMsg( 'version-parser-extensiontags' ), 'parser-tags' ); $out .= '' . $this->listToText( $tags ). "\n"; } if( $cnt = count( $fhooks = $wgParser->getFunctionHooks() ) ) { - $out .= $this->openExtType( wfMsg( 'version-parser-function-hooks' ) ); + $out .= $this->openExtType( wfMsg( 'version-parser-function-hooks' ), 'parser-function-hooks' ); $out .= '' . $this->listToText( $fhooks ) . "\n"; } if ( count( $wgSkinExtensionFunctions ) ) { - $out .= $this->openExtType( wfMsg( 'version-skin-extension-functions' ) ); + $out .= $this->openExtType( wfMsg( 'version-skin-extension-functions' ), 'skin-extension-functions' ); $out .= '' . $this->listToText( $wgSkinExtensionFunctions ) . "\n"; } $out .= Xml::closeElement( 'table' ); @@ -341,19 +341,20 @@ class SpecialVersion extends SpecialPage { return ''; } - private function openExtType($text, $name = null) { + private function openExtType( $text, $name = null ) { $opt = array( 'colspan' => 4 ); $out = ''; - if(!$this->firstExtOpened) { + if( !$this->firstExtOpened ) { // Insert a spacing line $out .= '' . Xml::element( 'td', $opt ) . "\n"; } $this->firstExtOpened = false; - if($name) { $opt['id'] = "sv-$name"; } + if( $name ) + $opt['id'] = "sv-$name"; - $out .= "" . Xml::element( 'th', $opt, $text) . "\n"; + $out .= "" . Xml::element( 'th', $opt, $text ) . "\n"; return $out; }