Ticket #10396: 10396_fix_a.diff
File 10396_fix_a.diff, 3.8 KB (added by , 15 years ago) |
---|
-
wp-admin/includes/upgrade.php
68 68 $user_id = wp_create_user($user_name, $user_password, $user_email); 69 69 update_user_option($user_id, 'default_password_nag', true); 70 70 } else if ( !$user_id ) { 71 $message = __('<strong><em>Note that password</em></strong> carefully!');71 $message = ''; 72 72 $user_id = wp_create_user($user_name, $user_password, $user_email); 73 73 } else { 74 74 $message = __('User already exists. Password inherited.'); -
wp-admin/install.php
94 94 <tr> 95 95 <th scope="row"><label for="admin_password"><?php _e('Password'); ?></label></th> 96 96 <td> 97 <input name="admin_password " type="password" id="pass1" size="25" value="<?php echo esc_attr( $admin_password ); ?>" />97 <input name="admin_password1" type="password" id="pass1" size="25" value="<?php echo esc_attr( $admin_password ); ?>" /> 98 98 <br /><?php _e('A password will be automatically generated for you if you leave this field blank.'); ?> 99 <input name="admin_password2" type="password" id="pass2" size="25" value="<?php echo esc_attr( $admin_password ); ?>" /> 100 <br /><?php _e('Type your password again.'); ?> 99 101 <br /><div id="pass-strength-result"><?php _e('Strength indicator'); ?></div> 100 102 <p class="description indicator-hint"><?php _e('Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! " ? $ % ^ & ).'); ?></p> 101 103 </td> … … 159 161 display_header(); 160 162 // Fill in the data we gathered 161 163 $weblog_title = isset( $_POST['weblog_title'] ) ? trim( stripslashes( $_POST['weblog_title'] ) ) : ''; 162 $user_name = isset($_POST['user_name']) ? trim( stripslashes( $_POST['user_name'] ) ) : 'admin'; 163 $admin_password = isset($_POST['admin_password']) ? trim( stripslashes( $_POST['admin_password'] ) ) : ''; 164 $user_name = isset( $_POST['user_name'] ) ? trim( stripslashes( $_POST['user_name'] ) ) : 'admin'; 165 $admin_password1 = isset( $_POST['admin_password1'] ) ? trim( stripslashes( $_POST['admin_password1'] ) ) : ''; 166 $admin_password2 = isset( $_POST['admin_password2'] ) ? trim( stripslashes( $_POST['admin_password2'] ) ) : ''; 164 167 $admin_email = isset( $_POST['admin_email'] ) ?trim( stripslashes( $_POST['admin_email'] ) ) : ''; 165 168 $public = isset( $_POST['blog_public'] ) ? (int) $_POST['blog_public'] : 0; 166 169 // check e-mail address … … 169 172 // TODO: poka-yoke 170 173 display_setup_form( __('you must provide a valid user name.') ); 171 174 $error = true; 175 } else if ( $admin_password1 != $admin_password2) { 176 // TODO: poka-yoke 177 display_setup_form( __( 'Please enter the same password into the two password fields.' ) ); 178 $error = true; 172 179 } else if ( empty( $admin_email ) ) { 173 180 // TODO: poka-yoke 174 181 display_setup_form( __( 'you must provide an e-mail address.' ) ); … … 181 188 182 189 if ( $error === false ) { 183 190 $wpdb->show_errors(); 184 $result = wp_install($weblog_title, $user_name, $admin_email, $public, '', $admin_password );191 $result = wp_install($weblog_title, $user_name, $admin_email, $public, '', $admin_password1); 185 192 extract( $result, EXTR_SKIP ); 186 193 ?> 187 194 … … 189 196 190 197 <p><?php _e( 'WordPress has been installed. Were you expecting more steps? Sorry to disappoint.' ); ?></p> 191 198 199 <?php if ( empty($admin_password1) ): ?> 192 200 <table class="form-table"> 193 201 <tr> 194 202 <th><?php _e( 'Username' ); ?></th> … … 203 211 </td> 204 212 </tr> 205 213 </table> 214 <?php endif; ?> 206 215 207 216 <p class="step"><a href="../wp-login.php" class="button"><?php _e( 'Log In' ); ?></a></p> 208 217