r115467 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r115466‎ | r115467 | r115468 >
Date:23:06, 31 May 2012
Author:aaron
Status:deferred
Tags:
Comment:
Moved is_dir() sanity check to refresh script; it cannot run on the apaches.
Modified paths:
  • /trunk/tools/mwmultiversion/multiversion/MWWikiversions.php (modified) (history)
  • /trunk/tools/mwmultiversion/multiversion/refreshWikiversionsCDB (modified) (history)

Diff [purge]

Index: trunk/tools/mwmultiversion/multiversion/refreshWikiversionsCDB
@@ -15,6 +15,14 @@
1616
1717 // Get the array of sanitized wikiversion rows...
1818 $rows = MWWikiversions::readWikiVersionsFile( $srcPath );
 19+ // Sanity check version directories...
 20+ foreach ( $rows as $row ) {
 21+ list( $dbName, $version, $extVersion, $comment ) = $row;
 22+ $versionDir = MULTIVER_COMMON_HOME . '/' . $version;
 23+ if ( !is_dir( $versionDir ) ) {
 24+ die( "Invalid version dir '$versionDir' for wiki '$dbName'.\n" );
 25+ }
 26+ }
1927 // Make sure all wikis have an entry...
2028 $dbNamesWithRows = array();
2129 foreach ( $rows as $row ) {
Index: trunk/tools/mwmultiversion/multiversion/MWWikiversions.php
@@ -56,12 +56,6 @@
5757 throw new Exception( "Invalid row on line $lineNo ('$line').\n" );
5858 }
5959
60 - // Sanity check version directory
61 - $versionDir = MULTIVER_COMMON_HOME . '/' . $version ;
62 - if ( !is_dir( $versionDir ) ) {
63 - throw new Exception( "Invalid version dir '$versionDir' on line $lineNo ('$line').\n" );
64 - }
65 -
6660 return array( $dbName, $version, $extVersion, $comment );
6761 }
6862

Status & tagging log