From 785a8289d3f51df4fc242edd8cbee84e17d4910f Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Tue, 2 Jun 2015 08:38:57 -0700 Subject: [PATCH] Do not support new installations via .php5 entrypoint any longer Continues the path of deprecating $wgScriptExtension and all of the related baggage. You'll only end up with sadness when we rip out of the rest of this later so don't let people shoot themselves in the foot. Change-Id: I34cd1d2c266405ebc761a271e3740e972fb7cf2f --- docs/scripts.txt | 5 +--- includes/installer/Installer.php | 15 ----------- includes/installer/LocalSettingsGenerator.php | 3 +-- includes/installer/WebInstaller.php | 5 ++-- includes/installer/WebInstallerPage.php | 7 ++--- mw-config/index.php5 | 26 ------------------- 6 files changed, 8 insertions(+), 53 deletions(-) delete mode 100644 mw-config/index.php5 diff --git a/docs/scripts.txt b/docs/scripts.txt index 178bb157bb..53dff36e42 100644 --- a/docs/scripts.txt +++ b/docs/scripts.txt @@ -49,7 +49,4 @@ Primary scripts: There is also a file with a .php5 extension for each script. They can be used if the web server needs a .php5 to run the file with the PHP 5 engine and runs .php -scripts with PHP 4. To use these files, you have to modify $wgScriptExtension to -'.php5' is LocalSettings.php but it is already done by the config script if you -used mw-config/index.php5 for installation. - +scripts with PHP 4. You should not use them anymore. diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index 5ae499dbaf..676efd662e 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -146,7 +146,6 @@ abstract class Installer { * @var array */ protected $envPreps = array( - 'envPrepExtension', 'envPrepServer', 'envPrepPath', ); @@ -177,7 +176,6 @@ abstract class Installer { 'wgGitBin', 'IP', 'wgScriptPath', - 'wgScriptExtension', 'wgMetaNamespace', 'wgDeletedDirectory', 'wgEnableUploads', @@ -1227,19 +1225,6 @@ abstract class Installer { */ abstract protected function envGetDefaultServer(); - /** - * Environment prep for setting the preferred PHP file extension. - */ - protected function envPrepExtension() { - // @todo FIXME: Detect this properly - if ( defined( 'MW_INSTALL_PHP5_EXT' ) ) { - $ext = '.php5'; - } else { - $ext = '.php'; - } - $this->setVar( 'wgScriptExtension', $ext ); - } - /** * Environment prep for setting $IP and $wgScriptPath. */ diff --git a/includes/installer/LocalSettingsGenerator.php b/includes/installer/LocalSettingsGenerator.php index 162a7897e4..9bf055c674 100644 --- a/includes/installer/LocalSettingsGenerator.php +++ b/includes/installer/LocalSettingsGenerator.php @@ -57,7 +57,7 @@ class LocalSettingsGenerator { $confItems = array_merge( array( - 'wgServer', 'wgScriptPath', 'wgScriptExtension', + 'wgServer', 'wgScriptPath', 'wgPasswordSender', 'wgImageMagickConvertCommand', 'wgShellLocale', 'wgLanguageCode', 'wgEnableEmail', 'wgEnableUserEmail', 'wgDiff3', 'wgEnotifUserTalk', 'wgEnotifWatchlist', 'wgEmailAuthentication', @@ -331,7 +331,6 @@ if ( !defined( 'MEDIAWIKI' ) ) { ## (like /w/index.php/Page_title to /wiki/Page_title) please see: ## https://www.mediawiki.org/wiki/Manual:Short_URL \$wgScriptPath = \"{$this->values['wgScriptPath']}\"; -\$wgScriptExtension = \"{$this->values['wgScriptExtension']}\"; ${serverSetting} ## The relative URL path to the skins directory \$wgStylePath = \"\$wgScriptPath/skins\"; diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php index 156606a6d6..4930826059 100644 --- a/includes/installer/WebInstaller.php +++ b/includes/installer/WebInstaller.php @@ -1184,12 +1184,11 @@ class WebInstaller extends Installer { } if ( $path !== false ) { $scriptPath = preg_replace( '{^(.*)/(mw-)?config.*$}', '$1', $path ); - $scriptExtension = $this->getVar( 'wgScriptExtension' ); $this->setVar( 'wgScriptPath', "$scriptPath" ); // Update variables set from Setup.php that are derived from wgScriptPath - $this->setVar( 'wgScript', "$scriptPath/index$scriptExtension" ); - $this->setVar( 'wgLoadScript', "$scriptPath/load$scriptExtension" ); + $this->setVar( 'wgScript', "$scriptPath/index.php" ); + $this->setVar( 'wgLoadScript', "$scriptPath/load.php" ); $this->setVar( 'wgStylePath', "$scriptPath/skins" ); $this->setVar( 'wgLocalStylePath', "$scriptPath/skins" ); $this->setVar( 'wgExtensionAssetsPath', "$scriptPath/extensions" ); diff --git a/includes/installer/WebInstallerPage.php b/includes/installer/WebInstallerPage.php index 98f3ae8a91..f40de7107f 100644 --- a/includes/installer/WebInstallerPage.php +++ b/includes/installer/WebInstallerPage.php @@ -669,6 +669,8 @@ class WebInstallerUpgrade extends WebInstallerPage { } public function showDoneMessage() { + global $wgScriptExtension; + $this->startForm(); $regenerate = !$this->getVar( '_ExistingDBSettings' ); if ( $regenerate ) { @@ -682,7 +684,7 @@ class WebInstallerUpgrade extends WebInstallerPage { wfMessage( $msg, $this->getVar( 'wgServer' ) . $this->getVar( 'wgScriptPath' ) . '/index' . - $this->getVar( 'wgScriptExtension' ) + $wgScriptExtension )->plain(), 'tick-32.png' ) ); @@ -1479,8 +1481,7 @@ class WebInstallerComplete extends WebInstallerPage { wfMessage( 'config-install-done', $lsUrl, $this->getVar( 'wgServer' ) . - $this->getVar( 'wgScriptPath' ) . '/index' . - $this->getVar( 'wgScriptExtension' ), + $this->getVar( 'wgScriptPath' ) . '/index.php', '' )->plain(), 'tick-32.png' ) diff --git a/mw-config/index.php5 b/mw-config/index.php5 deleted file mode 100644 index 889865326e..0000000000 --- a/mw-config/index.php5 +++ /dev/null @@ -1,26 +0,0 @@ -