X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Finstaller%2FWebInstallerPage.php;h=4bc6cad2465a3828efbb24c7ca12b5298d923a97;hb=102076134ff821a86e981b7e21c174b0b2889466;hp=e30373e019d2c28a85a844c797e5336ef7ac22b1;hpb=8cabb5f7778574aa723e5615b27a3f5ac104c48d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/installer/WebInstallerPage.php b/includes/installer/WebInstallerPage.php index e30373e019..4bc6cad246 100644 --- a/includes/installer/WebInstallerPage.php +++ b/includes/installer/WebInstallerPage.php @@ -185,7 +185,6 @@ abstract class WebInstallerPage { } class WebInstaller_Language extends WebInstallerPage { - public function execute() { global $wgLang; $r = $this->parent->request; @@ -381,7 +380,7 @@ class WebInstaller_ExistingWiki extends WebInstallerPage { /** * Initiate an upgrade of the existing database - * @param array $vars Variables from LocalSettings.php and AdminSettings.php + * @param array $vars Variables from LocalSettings.php * @return Status */ protected function handleExistingUpgrade( $vars ) { @@ -455,7 +454,9 @@ class WebInstaller_Welcome extends WebInstallerPage { } class WebInstaller_DBConnect extends WebInstallerPage { - + /** + * @return string|void When string, "skip" or "continue" + */ public function execute() { if ( $this->getVar( '_ExistingDBSettings' ) ) { return 'skip'; @@ -480,12 +481,11 @@ class WebInstaller_DBConnect extends WebInstallerPage { $settings = ''; $defaultType = $this->getVar( 'wgDBtype' ); - // Messages: config-support-mysql, config-support-postgres, config-support-oracle, - // config-support-sqlite + // Messages: config-dbsupport-mysql, config-dbsupport-postgres, config-dbsupport-oracle, + // config-dbsupport-sqlite, config-dbsupport-mssql $dbSupport = ''; - foreach ( $this->parent->getDBTypes() as $type ) { - $link = DatabaseBase::factory( $type )->getSoftwareLink(); - $dbSupport .= wfMessage( "config-support-$type", $link )->plain() . "\n"; + foreach ( Installer::getDBTypes() as $type ) { + $dbSupport .= wfMessage( "config-dbsupport-$type" )->plain() . "\n"; } $this->addHTML( $this->parent->getInfoBox( wfMessage( 'config-support-info', trim( $dbSupport ) )->text() ) ); @@ -827,7 +827,11 @@ class WebInstaller_Name extends WebInstallerPage { $msg = false; $pwd = $this->getVar( '_AdminPassword' ); $user = User::newFromName( $cname ); - $valid = $user && $user->getPasswordValidity( $pwd ); + if ( $user ) { + $valid = $user->getPasswordValidity( $pwd ); + } else { + $valid = 'config-admin-name-invalid'; + } if ( strval( $pwd ) === '' ) { # $user->getPasswordValidity just checks for $wgMinimalPasswordLength. # This message is more specific and helpful. @@ -835,8 +839,6 @@ class WebInstaller_Name extends WebInstallerPage { } elseif ( $pwd !== $this->getVar( '_AdminPassword2' ) ) { $msg = 'config-admin-password-mismatch'; } elseif ( $valid !== true ) { - # As of writing this will only catch the username being e.g. 'FOO' and - # the password 'foo' $msg = $valid; } if ( $msg !== false ) { @@ -1291,7 +1293,7 @@ class WebInstaller_Complete extends WebInstallerPage { ) { // JS appears to be the only method that works consistently with IE7+ $this->addHtml( "\n\n" ); + Xml::encodeJsVar( $lsUrl ) . "; } );\n" ); } else { $this->parent->request->response()->header( "Refresh: 0;url=$lsUrl" ); }