r93028 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93027‎ | r93028 | r93029 >
Date:23:14, 24 July 2011
Author:aaron
Status:ok
Tags:
Comment:
Changed getMediaWikiCli() to use /home or /usr for requested script based on whether the home/ or usr/ copy of MWScript.php was called. This makes it more consistent with how things are now.
Modified paths:
  • /trunk/tools/mwmultiversion/multiversion/MWVersion.php (modified) (history)

Diff [purge]

Index: trunk/tools/mwmultiversion/multiversion/MWVersion.php
@@ -41,9 +41,9 @@
4242 define( 'TESTWIKI', 1 );
4343 # Test wiki mostly runs off the version of MediaWiki on /home.
4444 # As horrible hack for NFS-less image scalers, use regular docroot for thumbs?
45 - $IP = getHomeMediaWikiDir() . "/$version";
 45+ $IP = "/home/wikipedia/common/$version";
4646 } else {
47 - $IP = getLocalMediaWikiDir() . "/$version";
 47+ $IP = "/usr/local/apache/common-local/$version";
4848 }
4949
5050 chdir( $IP );
@@ -69,28 +69,18 @@
7070
7171 require( dirname( __FILE__ ) . '/MWMultiVersion.php' );
7272 $multiVersion = MWMultiVersion::initializeForMaintenance();
 73+ if ( $multiVersion->getDatabase() === 'testwiki' ) {
 74+ define( 'TESTWIKI', 1 );
 75+ }
7376
7477 # Get the MediaWiki version running on this wiki...
7578 $version = $multiVersion->getVersion();
7679
7780 # Get the correct MediaWiki path based on this version...
78 - if ( $multiVersion->getDatabase() === 'testwiki' ) {
79 - define( 'TESTWIKI', 1 );
80 - $IP = getHomeMediaWikiDir() . "/$version";
81 - } else {
82 - $IP = getLocalMediaWikiDir() . "/$version";
83 - }
 81+ $IP = dirname( __FILE__ ) . "/../$version";
8482
8583 chdir( $IP );
8684 putenv( "MW_INSTALL_PATH=$IP" );
8785
8886 return "$IP/$file";
8987 }
90 -
91 -function getLocalMediaWikiDir() {
92 - return "/usr/local/apache/common";
93 -}
94 -
95 -function getHomeMediaWikiDir() {
96 - return "/home/wikipedia/common";
97 -}

Status & tagging log