Merge "Do not support new installations via .php5 entrypoint any longer"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 12 Jun 2015 20:49:56 +0000 (20:49 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 12 Jun 2015 20:49:56 +0000 (20:49 +0000)
1  2 
includes/installer/Installer.php

@@@ -146,7 -146,6 +146,6 @@@ abstract class Installer 
         * @var array
         */
        protected $envPreps = array(
-               'envPrepExtension',
                'envPrepServer',
                'envPrepPath',
        );
                'wgGitBin',
                'IP',
                'wgScriptPath',
-               'wgScriptExtension',
                'wgMetaNamespace',
                'wgDeletedDirectory',
                'wgEnableUploads',
                global $wgAutoloadClasses;
                $wgAutoloadClasses = array();
  
 -              wfSuppressWarnings();
 +              MediaWiki\suppressWarnings();
                $_lsExists = file_exists( "$IP/LocalSettings.php" );
 -              wfRestoreWarnings();
 +              MediaWiki\restoreWarnings();
  
                if ( !$_lsExists ) {
                        return false;
         * @return bool
         */
        protected function envCheckPCRE() {
 -              wfSuppressWarnings();
 +              MediaWiki\suppressWarnings();
                $regexd = preg_replace( '/[\x{0430}-\x{04FF}]/iu', '', '-АБВГД-' );
                // Need to check for \p support too, as PCRE can be compiled
                // with utf8 support, but not unicode property support.
                // check that \p{Zs} (space separators) matches
                // U+3000 (Ideographic space)
                $regexprop = preg_replace( '/\p{Zs}/u', '', "-\xE3\x80\x80-" );
 -              wfRestoreWarnings();
 +              MediaWiki\restoreWarnings();
                if ( $regexd != '--' || $regexprop != '--' ) {
                        $this->showError( 'config-pcre-no-utf8' );
  
         */
        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.
         */
                foreach ( $names as $name ) {
                        $command = $path . DIRECTORY_SEPARATOR . $name;
  
 -                      wfSuppressWarnings();
 +                      MediaWiki\suppressWarnings();
                        $file_exists = file_exists( $command );
 -                      wfRestoreWarnings();
 +                      MediaWiki\restoreWarnings();
  
                        if ( $file_exists ) {
                                if ( !$versionInfo ) {
  
                // it would be good to check other popular languages here, but it'll be slow.
  
 -              wfSuppressWarnings();
 +              MediaWiki\suppressWarnings();
  
                foreach ( $scriptTypes as $ext => $contents ) {
                        foreach ( $contents as $source ) {
                                unlink( $dir . $file );
  
                                if ( $text == 'exec' ) {
 -                                      wfRestoreWarnings();
 +                                      MediaWiki\restoreWarnings();
  
                                        return $ext;
                                }
                        }
                }
  
 -              wfRestoreWarnings();
 +              MediaWiki\restoreWarnings();
  
                return false;
        }
         * Some long-running pages (Install, Upgrade) will want to do this
         */
        protected function disableTimeLimit() {
 -              wfSuppressWarnings();
 +              MediaWiki\suppressWarnings();
                set_time_limit( 0 );
 -              wfRestoreWarnings();
 +              MediaWiki\restoreWarnings();
        }
  }