Changeset 29630 for trunk/src/wp-admin/install.php
- Timestamp:
- 08/26/2014 07:58:33 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/install.php
r29611 r29630 38 38 /** Load WordPress Administration Upgrade API */ 39 39 require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); 40 41 /** Load WordPress Translation Install API */ 42 require_once( ABSPATH . 'wp-admin/includes/translation-install.php' ); 40 43 41 44 /** Load wpdb */ … … 179 182 } 180 183 184 $langugage = ''; 185 if ( ! empty( $_REQUEST['language'] ) ) { 186 $langugage = preg_replace( '/[^a-zA-Z_]/', '', $_REQUEST['language'] ); 187 } 188 181 189 switch($step) { 182 190 case 0: // Step 0 183 191 184 if ( empty( $ _GET['language'] ) && ( $languages = wp_get_available_translations_from_api() ) ) {192 if ( empty( $langugage ) && ( $languages = wp_get_available_translations() ) ) { 185 193 display_header( 'language-chooser' ); 186 194 echo '<form id="setup" method="post" action="?step=1">'; … … 193 201 194 202 case 1: // Step 1, direct link or from language chooser. 195 if ( ! empty( $ _REQUEST['language']) ) {196 $loaded_language = wp_ install_download_language_pack( $_REQUEST['language']);203 if ( ! empty( $langugage ) ) { 204 $loaded_language = wp_download_language_pack( $langugage ); 197 205 if ( $loaded_language ) { 198 wp_install_load_language( $loaded_language );206 load_default_textdomain( $loaded_language ); 199 207 } 200 208 } … … 212 220 break; 213 221 case 2: 214 if ( ! empty( $_REQUEST['language']) ) {215 $loaded_language = wp_install_load_language( $_REQUEST['language'] );222 if ( ! empty( $langugage ) && load_default_textdomain( $langugage ) ) { 223 $loaded_language = $langugage; 216 224 } else { 217 225 $loaded_language = 'en_US'; … … 227 235 $admin_password = isset($_POST['admin_password']) ? wp_unslash( $_POST['admin_password'] ) : ''; 228 236 $admin_password_check = isset($_POST['admin_password2']) ? wp_unslash( $_POST['admin_password2'] ) : ''; 229 $admin_email = isset( $_POST['admin_email'] 230 $public = isset( $_POST['blog_public'] 237 $admin_email = isset( $_POST['admin_email'] ) ?trim( wp_unslash( $_POST['admin_email'] ) ) : ''; 238 $public = isset( $_POST['blog_public'] ) ? (int) $_POST['blog_public'] : 0; 231 239 232 240 // Check e-mail address.
Note: See TracChangeset
for help on using the changeset viewer.