Ticket #10396: 10396.diff
File 10396.diff, 2.4 KB (added by , 15 years ago) |
---|
-
wp-admin/install.php
60 60 <td><input name="weblog_title" type="text" id="weblog_title" size="25" value="<?php echo ( isset($_POST['weblog_title']) ? esc_attr($_POST['weblog_title']) : '' ); ?>" /></td> 61 61 </tr> 62 62 <tr> 63 <th scope="row"><label for="user_name"><?php _e('User Name'); ?></label></th> 64 <td><input name="user_name" type="text" id="user_name" size="25" value="<?php echo ( isset($_POST['user_name']) ? esc_attr($_POST['user_name']) : '' ); ?>" /></td> 65 </tr> 66 <tr> 63 67 <th scope="row"><label for="admin_email"><?php _e('Your E-mail'); ?></label></th> 64 68 <td><input name="admin_email" type="text" id="admin_email" size="25" value="<?php echo ( isset($_POST['admin_email']) ? esc_attr($_POST['admin_email']) : '' ); ?>" /><br /> 65 69 <?php _e('Double-check your email address before continuing.'); ?> … … 100 104 display_header(); 101 105 // Fill in the data we gathered 102 106 $weblog_title = isset($_POST['weblog_title']) ? stripslashes($_POST['weblog_title']) : ''; 107 $user_name = isset($_POST['user_name']) ? stripslashes($_POST['user_name']) : ''; 103 108 $admin_email = isset($_POST['admin_email']) ? stripslashes($_POST['admin_email']) : ''; 104 109 $public = isset($_POST['blog_public']) ? (int) $_POST['blog_public'] : 0; 105 110 // check e-mail address … … 108 113 // TODO: poka-yoke 109 114 display_setup_form( __('you must provide an e-mail address.') ); 110 115 $error = true; 116 } else if (empty($user_name)) { 117 // TODO: poka-yoke 118 display_setup_form( __('you must provide a valid user name.') ); 119 $error = true; 111 120 } else if (!is_email($admin_email)) { 112 121 // TODO: poka-yoke 113 122 display_setup_form( __('that isn’t a valid e-mail address. E-mail addresses look like: <code>username@example.com</code>') ); … … 116 125 117 126 if ( $error === false ) { 118 127 $wpdb->show_errors(); 119 $result = wp_install($weblog_title, 'admin', $admin_email, $public);128 $result = wp_install($weblog_title, $user_name, $admin_email, $public); 120 129 extract($result, EXTR_SKIP); 121 130 ?> 122 131 … … 127 136 <table class="form-table"> 128 137 <tr> 129 138 <th><?php _e('Username'); ?></th> 130 <td><code> admin</code></td>139 <td><code><?php echo $user_name; ?></code></td> 131 140 </tr> 132 141 <tr> 133 142 <th><?php _e('Password'); ?></th>