Index: branches/new-installer/phase3/includes/installer/Installer.i18n.php |
— | — | @@ -280,6 +280,8 @@ |
281 | 281 | 'config-admin-password-mismatch' => 'The two passwords you entered do not match.', |
282 | 282 | 'config-admin-email' => 'E-mail address:', |
283 | 283 | 'config-admin-email-help' => 'Enter an e-mail address here to allow you to receive e-mail from other users on the wiki, reset your password, and be notified of changes to pages on your watchlist.', |
| 284 | + 'config-admin-error-user' => 'Internal error when creating an admin with the name "<nowiki>$1</nowiki>".', |
| 285 | + 'config-admin-error-password' => 'Internal error when setting a password for the admin "<nowiki>$1</nowiki>": <pre>$2</pre>', |
284 | 286 | 'config-subscribe' => 'Subscribe to the [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce release announcements mailing list].', |
285 | 287 | 'config-subscribe-help' => 'This is a low-volume mailing list used for release announcements, including important security announcements. |
286 | 288 | You should subscribe to it and update your MediaWiki installation when new versions come out.', |
Index: branches/new-installer/phase3/includes/installer/Installer.php |
— | — | @@ -863,15 +863,19 @@ |
864 | 864 | } |
865 | 865 | |
866 | 866 | public function installSysop() { |
867 | | - $user = User::newFromName( $this->getVar( '_AdminName' ) ); |
| 867 | + $name = $this->getVar( '_AdminName' ); |
| 868 | + $user = User::newFromName( $name ); |
868 | 869 | if ( !$user ) { |
869 | | - return false; // we should've validated this earlier anyway! |
| 870 | + // we should've validated this earlier anyway! |
| 871 | + $this->output->addWarningMsg( 'config-admin-error-user', $name ); |
| 872 | + return false; |
870 | 873 | } |
871 | 874 | if ( $user->idForName() == 0 ) { |
872 | 875 | $user->addToDatabase(); |
873 | 876 | try { |
874 | 877 | $user->setPassword( $this->getVar( '_AdminPassword' ) ); |
875 | 878 | } catch( PasswordError $pwe ) { |
| 879 | + $this->output->addWarningMsg( 'config-admin-error-password', $name, $pwe->getMessage() ); |
876 | 880 | return false; |
877 | 881 | } |
878 | 882 | $user->saveSettings(); |