Index: trunk/tools/mwmultiversion/wmf-config/MWMultiVersion.php |
— | — | @@ -34,7 +34,7 @@ |
35 | 35 | } |
36 | 36 | |
37 | 37 | /** |
38 | | - * Factory method to get an instance of MWMultiVersion. |
| 38 | + * Factory method to get an instance of MWMultiVersion. |
39 | 39 | * Use this for all wikis except calls to /w/thumb.php on upload.wikmedia.org. |
40 | 40 | * @param $serverName the ServerName for this wiki -- $_SERVER['SERVER_NAME'] |
41 | 41 | * @param $docRoot the DocumentRoot for this wiki -- $_SERVER['DOCUMENT_ROOT'] |
— | — | @@ -43,7 +43,7 @@ |
44 | 44 | public static function initializeForWiki( $serverName, $docRoot ) { |
45 | 45 | $instance = self::createInstance(); |
46 | 46 | $instance->setSiteInfoForWiki( $serverName, $docRoot ); |
47 | | - return $instance; |
| 47 | + return $instance; |
48 | 48 | } |
49 | 49 | |
50 | 50 | /** |
— | — | @@ -104,7 +104,7 @@ |
105 | 105 | $site = "wikipedia"; |
106 | 106 | } |
107 | 107 | } else { |
108 | | - $site = "wikipedia"; |
| 108 | + $site = "wikipedia"; |
109 | 109 | if ( preg_match( '/^(?:\/usr\/local\/apache\/|\/home\/wikipedia\/)(?:htdocs|common\/docroot)\/([a-z]+)\.org/', $docRoot, $matches ) ) { |
110 | 110 | $site = $matches[1]; |
111 | 111 | if ( preg_match( '/^(.*)\.' . preg_quote( $site ) . '\.org$/', $serverName, $matches ) ) { |
— | — | @@ -203,7 +203,7 @@ |
204 | 204 | $db = dba_open( '/usr/local/apache/common/wikiversions.cdb', 'r', 'cdb' ); |
205 | 205 | if ( $db ) { |
206 | 206 | $version = dba_fetch( $this->getDatabase(), $db ); |
207 | | - if ( strpos( $version, '-' ) === false ) { |
| 207 | + if ( strpos( $version, 'php-' ) !== 0 ) { |
208 | 208 | die( 'wikiversions.cdb entry should be of the format: php-...' ); |
209 | 209 | } |
210 | 210 | } else { |
Index: trunk/tools/mwmultiversion/checkoutMediaWiki.php |
— | — | @@ -29,7 +29,7 @@ |
30 | 30 | if ( count( $argv ) >= 3 ) { |
31 | 31 | $svnVersion = $argv[1]; // e.g. "X.XXwmfX" |
32 | 32 | $dstVersion = $argv[2]; // e.g. "php-X.XX" |
33 | | - if ( preg_match( '/^php-(\d+\.\d+)$/', $dstVersion, $m ) ) { |
| 33 | + if ( preg_match( '/^php-(\d+\.\d+|trunk)$/', $dstVersion, $m ) ) { |
34 | 34 | $dstVersionNum = $m[1]; |
35 | 35 | $argsValid = true; |
36 | 36 | } |
— | — | @@ -122,7 +122,7 @@ |
123 | 123 | print "File already exists: $path\n"; |
124 | 124 | } |
125 | 125 | |
126 | | - print "MediaWiki $dstVersionNum, from $svnVersion, successfully checked out.\n"; |
| 126 | + print "MediaWiki $dstVersionNum, from $svnVersion, successfully checked out.\n"; |
127 | 127 | } |
128 | 128 | |
129 | 129 | checkoutMediaWiki(); |