r50125 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50124‎ | r50125 | r50126 >
Date:10:49, 2 May 2009
Author:nikerabbit
Status:ok
Tags:
Comment:
* Hack for checkLanguage.php to work without database
Modified paths:
  • /trunk/phase3/includes/specials/SpecialVersion.php (modified) (history)
  • /trunk/phase3/maintenance/language/checkLanguage.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/checkLanguage.inc
@@ -418,7 +418,7 @@
419419
420420 $tableRows = implode( "\n|-\n", $rows );
421421
422 - $version = SpecialVersion::getVersion( $IP );
 422+ $version = SpecialVersion::getVersion( 'nodb' );
423423 echo <<<EOL
424424 '''Check results are for:''' <code>$version</code>
425425
Index: trunk/phase3/includes/specials/SpecialVersion.php
@@ -111,12 +111,18 @@
112112 *
113113 * @return mixed
114114 */
115 - public static function getVersion() {
 115+ public static function getVersion( $flags = '' ) {
116116 global $wgVersion, $IP;
117117 wfProfileIn( __METHOD__ );
118 - $svn = self::getSvnRevision( $IP, false, false , false);
119 - $svnCo = self::getSvnRevision( $IP, true, false , false);
120 - $version = $svn ? $wgVersion . wfMsg( 'version-svn-revision', $svn, $svnCo ) : $wgVersion;
 118+ $svn = self::getSvnRevision( $IP, false, false , false );
 119+ $svnCo = self::getSvnRevision( $IP, true, false , false );
 120+ if ( !$svn ) {
 121+ $version = $wgVersion;
 122+ } elseif( $flags === 'nodb' ) {
 123+ $version = "$wgVersion ($svnCo)";
 124+ } else {
 125+ $version = $wgVersion . wfMsg( 'version-svn-revision', $svn, $svnCo );
 126+ }
121127 wfProfileOut( __METHOD__ );
122128 return $version;
123129 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r50302* Same hack for transstat.php as in r50125nikerabbit07:47, 7 May 2009

Status & tagging log