X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Finstaller%2FInstaller.php;h=0294c4281eb8dfee053d18cc4b97f6270265d8b0;hb=5a4a33a8ff7241c4b4e12c169195080c1fe417ee;hp=cdc8266ce79653d44ce493c18acfb7f9d0c5b0c8;hpb=d3b172af3bcb32b28b836dc5abf4ec3337428c6c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index cdc8266ce7..0294c4281e 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -119,7 +119,6 @@ abstract class Installer { 'envCheckRegisterGlobals', 'envCheckBrokenXML', 'envCheckMagicQuotes', - 'envCheckMagicSybase', 'envCheckMbstring', 'envCheckSafeMode', 'envCheckXML', @@ -219,6 +218,7 @@ abstract class Installer { '_LicenseCode' => 'none', '_CCDone' => false, '_Extensions' => array(), + '_Skins' => array(), '_MemCachedServers' => '', '_UpgradeKeySupplied' => false, '_ExistingDBSettings' => false, @@ -761,31 +761,19 @@ abstract class Installer { } /** - * Environment check for magic_quotes_runtime. + * Environment check for magic_quotes_(gpc|runtime|sybase). * @return bool */ protected function envCheckMagicQuotes() { - if ( wfIniGetBool( "magic_quotes_runtime" ) ) { - $this->showError( 'config-magic-quotes-runtime' ); - - return false; - } - - return true; - } - - /** - * Environment check for magic_quotes_sybase. - * @return bool - */ - protected function envCheckMagicSybase() { - if ( wfIniGetBool( 'magic_quotes_sybase' ) ) { - $this->showError( 'config-magic-quotes-sybase' ); - - return false; + $status = true; + foreach ( array( 'gpc', 'runtime', 'sybase' ) as $magicJunk ) { + if ( wfIniGetBool( "magic_quotes_$magicJunk" ) ) { + $this->showError( "config-magic-quotes-$magicJunk" ); + $status = false; + } } - return true; + return $status; } /** @@ -1440,17 +1428,20 @@ abstract class Installer { } /** - * Finds extensions that follow the format /extensions/Name/Name.php, + * Finds extensions that follow the format /$directory/Name/Name.php, * and returns an array containing the value for 'Name' for each found extension. * + * Reasonable values for $directory include 'extensions' (the default) and 'skins'. + * + * @param string $directory Directory to search in * @return array */ - public function findExtensions() { + public function findExtensions( $directory = 'extensions' ) { if ( $this->getVar( 'IP' ) === null ) { return array(); } - $extDir = $this->getVar( 'IP' ) . '/extensions'; + $extDir = $this->getVar( 'IP' ) . '/' . $directory; if ( !is_readable( $extDir ) || !is_dir( $extDir ) ) { return array(); }