r50108 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50107‎ | r50108 | r50109 >
Date:16:39, 1 May 2009
Author:shinjiman
Status:ok
Tags:
Comment:
Show the SVN revision numbers as a separate column in Special:Version
Modified paths:
  • /trunk/phase3/includes/specials/SpecialVersion.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialVersion.php
@@ -199,24 +199,24 @@
200200
201201 if ( count( $wgExtensionFunctions ) ) {
202202 $out .= $this->openExtType( wfMsg( 'version-extension-functions' ) );
203 - $out .= '<tr><td colspan="3">' . $this->listToText( $wgExtensionFunctions ) . "</td></tr>\n";
 203+ $out .= '<tr><td colspan="4">' . $this->listToText( $wgExtensionFunctions ) . "</td></tr>\n";
204204 }
205205
206206 if ( $cnt = count( $tags = $wgParser->getTags() ) ) {
207207 for ( $i = 0; $i < $cnt; ++$i )
208208 $tags[$i] = "&lt;{$tags[$i]}&gt;";
209209 $out .= $this->openExtType( wfMsg( 'version-parser-extensiontags' ) );
210 - $out .= '<tr><td colspan="3">' . $this->listToText( $tags ). "</td></tr>\n";
 210+ $out .= '<tr><td colspan="4">' . $this->listToText( $tags ). "</td></tr>\n";
211211 }
212212
213213 if( $cnt = count( $fhooks = $wgParser->getFunctionHooks() ) ) {
214214 $out .= $this->openExtType( wfMsg( 'version-parser-function-hooks' ) );
215 - $out .= '<tr><td colspan="3">' . $this->listToText( $fhooks ) . "</td></tr>\n";
 215+ $out .= '<tr><td colspan="4">' . $this->listToText( $fhooks ) . "</td></tr>\n";
216216 }
217217
218218 if ( count( $wgSkinExtensionFunctions ) ) {
219219 $out .= $this->openExtType( wfMsg( 'version-skin-extension-functions' ) );
220 - $out .= '<tr><td colspan="3">' . $this->listToText( $wgSkinExtensionFunctions ) . "</td></tr>\n";
 220+ $out .= '<tr><td colspan="4">' . $this->listToText( $wgSkinExtensionFunctions ) . "</td></tr>\n";
221221 }
222222 $out .= Xml::closeElement( 'table' );
223223 return $out;
@@ -235,6 +235,7 @@
236236 }
237237
238238 function formatCredits( $name, $version = null, $subVersion = null, $subVersionCo = null, $subVersionURL = null, $author = null, $url = null, $description = null, $descriptionMsg = null ) {
 239+ $haveSubversion = $subVersion;
239240 $extension = isset( $url ) ? "[$url $name]" : $name;
240241 $version = isset( $version ) ? wfMsg( 'version-version', $version ) : '';
241242 $subVersion = isset( $subVersion ) ? wfMsg( 'version-svn-revision', $subVersion, $subVersionCo ) : '';
@@ -248,11 +249,19 @@
249250 }
250251 }
251252
252 - return "<tr>
253 - <td><em>$extension $version $subVersion</em></td>
254 - <td>$description</td>
255 - <td>" . $this->listToText( (array)$author ) . "</td>
256 - </tr>\n";
 253+ if ( $haveSubversion ) {
 254+ $extNameVer = "<tr>
 255+ <td><em>$extension $version</em></td>
 256+ <td><em>$subVersion</em></td>";
 257+ } else {
 258+ $extNameVer = "<tr>
 259+ <td colspan=\"2\"><em>$extension $version</em></td>";
 260+ }
 261+ $extDescAuthor = "<td>$description</td>
 262+ <td>" . $this->listToText( (array)$author ) . "</td>
 263+ </tr>\n";
 264+ return $ret = $extNameVer . $extDescAuthor;
 265+ return $ret;
257266 }
258267
259268 /**
@@ -285,7 +294,7 @@
286295 }
287296
288297 private function openExtType($text, $name = null) {
289 - $opt = array( 'colspan' => 3 );
 298+ $opt = array( 'colspan' => 4 );
290299 $out = '';
291300
292301 if(!$this->firstExtOpened) {

Status & tagging log