Fix variable usage in new language install choices. see #28577.
git-svn-id: https://develop.svn.wordpress.org/trunk@28779 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ae2cce3f64
commit
aa6ef01298
@ -100,10 +100,11 @@ function display_setup_form( $error = null ) {
|
|||||||
$sql = $wpdb->prepare( "SHOW TABLES LIKE %s", $wpdb->esc_like( $wpdb->users ) );
|
$sql = $wpdb->prepare( "SHOW TABLES LIKE %s", $wpdb->esc_like( $wpdb->users ) );
|
||||||
$user_table = ( $wpdb->get_var( $sql ) != null );
|
$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;
|
$blog_public = 1;
|
||||||
if ( ! empty( $_POST ) )
|
if ( isset( $_POST['weblog_title'] ) ) {
|
||||||
$blog_public = isset( $_POST['blog_public'] );
|
$blog_public = isset( $_POST['blog_public'] );
|
||||||
|
}
|
||||||
|
|
||||||
$weblog_title = isset( $_POST['weblog_title'] ) ? trim( wp_unslash( $_POST['weblog_title'] ) ) : '';
|
$weblog_title = isset( $_POST['weblog_title'] ) ? trim( wp_unslash( $_POST['weblog_title'] ) ) : '';
|
||||||
$user_name = isset($_POST['user_name']) ? trim( wp_unslash( $_POST['user_name'] ) ) : '';
|
$user_name = isset($_POST['user_name']) ? trim( wp_unslash( $_POST['user_name'] ) ) : '';
|
||||||
@ -251,7 +252,7 @@ switch($step) {
|
|||||||
$loading_language = '';
|
$loading_language = '';
|
||||||
if ( ! empty( $_POST['language'] ) ) {
|
if ( ! empty( $_POST['language'] ) ) {
|
||||||
$available_languages = get_available_languages();
|
$available_languages = get_available_languages();
|
||||||
if ( isset( $available_languages[ $_POST['language'] ] ) ) {
|
if ( in_array( $_POST['language'], $available_languages ) ) {
|
||||||
$loading_language = $_POST['language'];
|
$loading_language = $_POST['language'];
|
||||||
load_textdomain( 'default', WP_LANG_DIR . "/{$loading_language}.mo" );
|
load_textdomain( 'default', WP_LANG_DIR . "/{$loading_language}.mo" );
|
||||||
load_textdomain( 'default', WP_LANG_DIR . "/admin-{$loading_language}.mo" );
|
load_textdomain( 'default', WP_LANG_DIR . "/admin-{$loading_language}.mo" );
|
||||||
|
Loading…
Reference in New Issue
Block a user