Index: trunk/tools/mwmultiversion/multiversion/refreshWikiversionsCDB |
— | — | @@ -15,6 +15,14 @@ |
16 | 16 | |
17 | 17 | // Get the array of sanitized wikiversion rows... |
18 | 18 | $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 | + } |
19 | 27 | // Make sure all wikis have an entry... |
20 | 28 | $dbNamesWithRows = array(); |
21 | 29 | foreach ( $rows as $row ) { |
Index: trunk/tools/mwmultiversion/multiversion/MWWikiversions.php |
— | — | @@ -56,12 +56,6 @@ |
57 | 57 | throw new Exception( "Invalid row on line $lineNo ('$line').\n" ); |
58 | 58 | } |
59 | 59 | |
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 | | - |
66 | 60 | return array( $dbName, $version, $extVersion, $comment ); |
67 | 61 | } |
68 | 62 | |