'envCheckRegisterGlobals',
'envCheckBrokenXML',
'envCheckMagicQuotes',
- 'envCheckMagicSybase',
'envCheckMbstring',
'envCheckSafeMode',
'envCheckXML',
abstract public function showError( $msg /*, ... */ );
/**
- * Shows messages to the user through a Status object
+ * Show a message to the installing user by using a Status object
* @param Status $status
*/
- public function showStatusMessage( Status $status ) {
- $errors = array_merge( $status->getErrorsArray(), $status->getWarningsArray() );
- if ( $errors ) {
- foreach ( $errors as $error ) {
- call_user_func( 'showMessage', $error );
- }
- }
- }
+ abstract public function showStatusMessage( Status $status );
/**
* Constructor, always call this from child classes.
public static function getExistingLocalSettings() {
global $IP;
+ // You might be wondering why this is here. Well if you don't do this
+ // then some poorly-formed extensions try to call their own classes
+ // after immediately registering them. We really need to get extension
+ // registration out of the global scope and into a real format.
+ // @see https://bugzilla.wikimedia.org/67440
+ global $wgAutoloadClasses;
+ $wgAutoloadClasses = array();
+
wfSuppressWarnings();
$_lsExists = file_exists( "$IP/LocalSettings.php" );
wfRestoreWarnings();
}
/**
- * 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;
}
/**
*
* Used only by environment checks.
*
- * @param string $path path to search
- * @param array $names of executable names
+ * @param string $path Path to search
+ * @param array $names Array of executable names
* @param array|bool $versionInfo False or array with two members:
* 0 => Command to run for version check, with $1 for the full executable name
* 1 => String to compare the output with