From bc60e85960d2317a0b2190de8d8c7df129b01629 Mon Sep 17 00:00:00 2001 From: westi Date: Sun, 15 Feb 2009 12:58:10 +0000 Subject: [PATCH] Improve the installer when people enter a duff email address. Fixes #5477 props jacobsantos. git-svn-id: http://svn.automattic.com/wordpress/trunk@10574 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/install.php | 59 +++++++++++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 22 deletions(-) diff --git a/wp-admin/install.php b/wp-admin/install.php index de5b970d6d..48ec2dfb1c 100644 --- a/wp-admin/install.php +++ b/wp-admin/install.php @@ -48,6 +48,31 @@ header( 'Content-Type: text/html; charset=utf-8' ); +

:

+ +
+ + + + + + + + + + + +

+ +
+

+
+'.__('Already Installed').'

'.__('You appear to have already installed WordPress. To reinstall please clear your old database tables first.').'

');} @@ -63,25 +88,10 @@ switch($step) {

-
- - - - - - - - - - - -

- -
-

-
+ error) ) @@ -93,17 +103,21 @@ switch($step) { $admin_email = isset($_POST['admin_email']) ? stripslashes($_POST['admin_email']) : ''; $public = isset($_POST['blog_public']) ? (int) $_POST['blog_public'] : 0; // check e-mail address + $error = false; if (empty($admin_email)) { // TODO: poka-yoke - die('

'.__("ERROR: you must provide an e-mail address.").'

'); + display_setup_form( __('you must provide an e-mail address.') ); + $error = true; } else if (!is_email($admin_email)) { // TODO: poka-yoke - die('

'.__('ERROR: that isn’t a valid e-mail address. E-mail addresses look like: username@example.com').'

'); + display_setup_form( __('that isn’t a valid e-mail address. E-mail addresses look like: username@example.com') ); + $error = true; } - $wpdb->show_errors(); - $result = wp_install($weblog_title, 'admin', $admin_email, $public); - extract($result, EXTR_SKIP); + if ( $error === false ) { + $wpdb->show_errors(); + $result = wp_install($weblog_title, 'admin', $admin_email, $public); + extract($result, EXTR_SKIP); ?>

@@ -125,6 +139,7 @@ switch($step) {