* (bug 21826) Subsections of Special:Version now also have anchors
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 12 Dec 2009 15:34:23 +0000 (15:34 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 12 Dec 2009 15:34:23 +0000 (15:34 +0000)
RELEASE-NOTES
includes/specials/SpecialVersion.php

index 2ca7e94..45d7384 100644 (file)
@@ -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 ===
 
index 94622a0..eebbeaa 100644 (file)
@@ -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 .= '<tr><td colspan="4">' . $this->listToText( $wgExtensionFunctions ) . "</td></tr>\n";
                }
 
                if ( $cnt = count( $tags = $wgParser->getTags() ) ) {
                        for ( $i = 0; $i < $cnt; ++$i )
                                $tags[$i] = "&lt;{$tags[$i]}&gt;";
-                       $out .= $this->openExtType( wfMsg( 'version-parser-extensiontags' ) );
+                       $out .= $this->openExtType( wfMsg( 'version-parser-extensiontags' ), 'parser-tags' );
                        $out .= '<tr><td colspan="4">' . $this->listToText( $tags ). "</td></tr>\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 .= '<tr><td colspan="4">' . $this->listToText( $fhooks ) . "</td></tr>\n";
                }
 
                if ( count( $wgSkinExtensionFunctions ) ) {
-                       $out .= $this->openExtType( wfMsg( 'version-skin-extension-functions' ) );
+                       $out .= $this->openExtType( wfMsg( 'version-skin-extension-functions' ), 'skin-extension-functions' );
                        $out .= '<tr><td colspan="4">' . $this->listToText( $wgSkinExtensionFunctions ) . "</td></tr>\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 .= '<tr class="sv-space">' . Xml::element( 'td', $opt ) . "</tr>\n";
                }
                $this->firstExtOpened = false;
 
-               if($name) { $opt['id'] = "sv-$name"; }
+               if( $name )
+                       $opt['id'] = "sv-$name";
 
-               $out .= "<tr>" . Xml::element( 'th', $opt, $text) . "</tr>\n";
+               $out .= "<tr>" . Xml::element( 'th', $opt, $text ) . "</tr>\n";
                return $out;
        }