Ticket #19786: 19786.diff
File 19786.diff, 3.0 KB (added by , 13 years ago) |
---|
-
wp-admin/install.php
39 39 require_once( dirname( __FILE__ ) . '/includes/upgrade.php' ); 40 40 41 41 /** Load wpdb */ 42 require_once( dirname(dirname(__FILE__)) . '/wp-includes/wp-db.php');42 require_once( dirname( dirname( __FILE__ ) ) . '/wp-includes/wp-db.php' ); 43 43 44 $step = isset( $_GET['step'] ) ? $_GET['step'] : 0;44 $step = isset( $_GET['step'] ) ? (int) $_GET['step'] : 0; 45 45 46 46 /** 47 47 * Display install header. … … 183 183 display_header(); 184 184 // Fill in the data we gathered 185 185 $weblog_title = isset( $_POST['weblog_title'] ) ? trim( stripslashes( $_POST['weblog_title'] ) ) : ''; 186 $user_name = isset( $_POST['user_name']) ? trim( stripslashes( $_POST['user_name'] ) ) : 'admin';187 $admin_password = isset( $_POST['admin_password']) ? $_POST['admin_password'] : '';188 $admin_password_check = isset( $_POST['admin_password2']) ? $_POST['admin_password2'] : '';189 $admin_email = isset( $_POST['admin_email'] ) ?trim( stripslashes( $_POST['admin_email'] ) ) : '';190 $public = isset( $_POST['blog_public']) ? (int) $_POST['blog_public'] : 0;186 $user_name = isset( $_POST['user_name'] ) ? trim( stripslashes( $_POST['user_name'] ) ) : 'admin'; 187 $admin_password = isset( $_POST['admin_password'] ) ? $_POST['admin_password'] : ''; 188 $admin_password_check = isset( $_POST['admin_password2'] ) ? $_POST['admin_password2'] : ''; 189 $admin_email = isset( $_POST['admin_email'] ) ? trim( stripslashes( $_POST['admin_email'] ) ) : ''; 190 $public = isset( $_POST['blog_public'] ) ? (int) $_POST['blog_public'] : 0; 191 191 // check e-mail address 192 192 $error = false; 193 193 if ( empty( $user_name ) ) { 194 194 // TODO: poka-yoke 195 display_setup_form( __( 'you must provide a valid username.') );195 display_setup_form( __( 'you must provide a valid username.' ) ); 196 196 $error = true; 197 197 } elseif ( $user_name != sanitize_user( $user_name, true ) ) { 198 display_setup_form( __( 'the username you provided has invalid characters.') );198 display_setup_form( __( 'the username you provided has invalid characters.' ) ); 199 199 $error = true; 200 200 } elseif ( $admin_password != $admin_password_check ) { 201 201 // TODO: poka-yoke -
wp-admin/setup-config.php
62 62 if (file_exists(ABSPATH . '../wp-config.php') && ! file_exists(ABSPATH . '../wp-settings.php')) 63 63 wp_die("<p>The file 'wp-config.php' already exists one level above your WordPress installation. If you need to reset any of the configuration items in this file, please delete it first. You may try <a href='install.php'>installing now</a>.</p>"); 64 64 65 if (isset($_GET['step'])) 66 $step = $_GET['step']; 67 else 68 $step = 0; 65 $step = isset( $_GET['step'] ) ? (int) $_GET['step'] : 0; 69 66 70 67 /** 71 68 * Display setup wp-config.php file header.