Waldir has uploaded a new change for review. https://gerrit.wikimedia.org/r/133222
Change subject: better scriptpath default for installer.php ...................................................................... better scriptpath default for installer.php If the parameters to installer.php aren't specified, it uses the default values as defined in DefaultSettings.php. In the case of scriptpath, this doesn't work out of the box, unless the server has previously been configured to route /wiki (the default $wgScriptPath). This change makes installer.php use mediawiki's core directory as scriptpath, which at least would work without any special configurations on the server. This is similar to what the web installer does already (see envCheckPath() at includes/installer/WebInstaller.php#L1143), so this change also improves consistency between the installers. Change-Id: Ie50be570a29eca9a734beee0337d667a8b29f65a --- M maintenance/install.php 1 file changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/22/133222/1 diff --git a/maintenance/install.php b/maintenance/install.php index 5a3e00c..0d70923 100644 --- a/maintenance/install.php +++ b/maintenance/install.php @@ -34,7 +34,8 @@ /** * Maintenance script to install and configure MediaWiki * - * Default values for the options are defined in DefaultSettings.php (see the mapping in CliInstaller.php) + * Default values for the options are defined in DefaultSettings.php + * (see the mapping in includes/installer/CliInstaller.php) * Default for --dbpath (SQLite-specific) is defined in SqliteInstaller::getGlobalDefaults * * @ingroup Maintenance @@ -60,7 +61,7 @@ /* $this->addOption( 'email', 'The email for the wiki administrator', false, true ); */ $this->addOption( 'scriptpath', - 'The relative path of the wiki in the web server (/wiki)', + 'The relative path of the wiki in the web server (/' . basename( dirname( __DIR__ ) ) . ')', false, true ); @@ -98,6 +99,11 @@ $siteName = $this->getArg( 0, 'MediaWiki' ); // Will not be set if used with --env-checks $adminName = $this->getArg( 1 ); + $scriptpath = $this->getOption( 'scriptpath', false ); + if ( $scriptpath == false ) { + $this->mOptions['scriptpath'] = '/' . basename( dirname( __DIR__ ) ); + } + $dbpassfile = $this->getOption( 'dbpassfile' ); if ( $dbpassfile !== null ) { if ( $this->getOption( 'dbpass' ) !== null ) { -- To view, visit https://gerrit.wikimedia.org/r/133222 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie50be570a29eca9a734beee0337d667a8b29f65a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Waldir <wal...@email.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits