Fix variable usage in new language install choices. see #28577.

Built from https://develop.svn.wordpress.org/trunk@28779


git-svn-id: http://core.svn.wordpress.org/trunk@28592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2014-06-19 04:37:15 +00:00
parent 95deee2de5
commit 23de72f9e0
1 changed files with 4 additions and 3 deletions

View File

@ -100,10 +100,11 @@ function display_setup_form( $error = null ) {
$sql = $wpdb->prepare( "SHOW TABLES LIKE %s", $wpdb->esc_like( $wpdb->users ) );
$user_table = ( $wpdb->get_var( $sql ) != null );
// Ensure that Blogs appear in search engines by default
// Ensure that Blogs appear in search engines by default.
$blog_public = 1;
if ( ! empty( $_POST ) )
if ( isset( $_POST['weblog_title'] ) ) {
$blog_public = isset( $_POST['blog_public'] );
}
$weblog_title = isset( $_POST['weblog_title'] ) ? trim( wp_unslash( $_POST['weblog_title'] ) ) : '';
$user_name = isset($_POST['user_name']) ? trim( wp_unslash( $_POST['user_name'] ) ) : '';
@ -251,7 +252,7 @@ switch($step) {
$loading_language = '';
if ( ! empty( $_POST['language'] ) ) {
$available_languages = get_available_languages();
if ( isset( $available_languages[ $_POST['language'] ] ) ) {
if ( in_array( $_POST['language'], $available_languages ) ) {
$loading_language = $_POST['language'];
load_textdomain( 'default', WP_LANG_DIR . "/{$loading_language}.mo" );
load_textdomain( 'default', WP_LANG_DIR . "/admin-{$loading_language}.mo" );