r59995 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59994‎ | r59995 | r59996 >
Date:15:34, 12 December 2009
Author:ialex
Status:ok
Tags:
Comment:
* (bug 21826) Subsections of Special:Version now also have anchors
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/specials/SpecialVersion.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialVersion.php
@@ -197,7 +197,7 @@
198198
199199 foreach ( $extensionTypes as $type => $text ) {
200200 if ( isset ( $wgExtensionCredits[$type] ) && count ( $wgExtensionCredits[$type] ) ) {
201 - $out .= $this->openExtType( $text );
 201+ $out .= $this->openExtType( $text, 'credits-' . $type );
202202
203203 usort( $wgExtensionCredits[$type], array( $this, 'compare' ) );
204204
@@ -208,24 +208,24 @@
209209 }
210210
211211 if ( count( $wgExtensionFunctions ) ) {
212 - $out .= $this->openExtType( wfMsg( 'version-extension-functions' ) );
 212+ $out .= $this->openExtType( wfMsg( 'version-extension-functions' ), 'extension-functions' );
213213 $out .= '<tr><td colspan="4">' . $this->listToText( $wgExtensionFunctions ) . "</td></tr>\n";
214214 }
215215
216216 if ( $cnt = count( $tags = $wgParser->getTags() ) ) {
217217 for ( $i = 0; $i < $cnt; ++$i )
218218 $tags[$i] = "&lt;{$tags[$i]}&gt;";
219 - $out .= $this->openExtType( wfMsg( 'version-parser-extensiontags' ) );
 219+ $out .= $this->openExtType( wfMsg( 'version-parser-extensiontags' ), 'parser-tags' );
220220 $out .= '<tr><td colspan="4">' . $this->listToText( $tags ). "</td></tr>\n";
221221 }
222222
223223 if( $cnt = count( $fhooks = $wgParser->getFunctionHooks() ) ) {
224 - $out .= $this->openExtType( wfMsg( 'version-parser-function-hooks' ) );
 224+ $out .= $this->openExtType( wfMsg( 'version-parser-function-hooks' ), 'parser-function-hooks' );
225225 $out .= '<tr><td colspan="4">' . $this->listToText( $fhooks ) . "</td></tr>\n";
226226 }
227227
228228 if ( count( $wgSkinExtensionFunctions ) ) {
229 - $out .= $this->openExtType( wfMsg( 'version-skin-extension-functions' ) );
 229+ $out .= $this->openExtType( wfMsg( 'version-skin-extension-functions' ), 'skin-extension-functions' );
230230 $out .= '<tr><td colspan="4">' . $this->listToText( $wgSkinExtensionFunctions ) . "</td></tr>\n";
231231 }
232232 $out .= Xml::closeElement( 'table' );
@@ -341,19 +341,20 @@
342342 return '';
343343 }
344344
345 - private function openExtType($text, $name = null) {
 345+ private function openExtType( $text, $name = null ) {
346346 $opt = array( 'colspan' => 4 );
347347 $out = '';
348348
349 - if(!$this->firstExtOpened) {
 349+ if( !$this->firstExtOpened ) {
350350 // Insert a spacing line
351351 $out .= '<tr class="sv-space">' . Xml::element( 'td', $opt ) . "</tr>\n";
352352 }
353353 $this->firstExtOpened = false;
354354
355 - if($name) { $opt['id'] = "sv-$name"; }
 355+ if( $name )
 356+ $opt['id'] = "sv-$name";
356357
357 - $out .= "<tr>" . Xml::element( 'th', $opt, $text) . "</tr>\n";
 358+ $out .= "<tr>" . Xml::element( 'th', $opt, $text ) . "</tr>\n";
358359 return $out;
359360 }
360361
Index: trunk/phase3/RELEASE-NOTES
@@ -296,6 +296,7 @@
297297 * $wgTexvcBackgroundColor contains background color for texvc call
298298 * (bug 21574) Redirects can now have "303 See Other" HTTP status
299299 * EditPage refactored to allow extensions to derive new edit modes much easier.
 300+* (bug 21826) Subsections of Special:Version now also have anchors
300301
301302 === Bug fixes in 1.16 ===
302303

Status & tagging log