Make WordPress Core

Ticket #29487: 29487.2.diff

File 29487.2.diff, 1.0 KB (added by nacin, 10 years ago)
  • src/wp-admin/install.php

     
    184184$langugage = '';
    185185if ( ! empty( $_REQUEST['language'] ) ) {
    186186        $langugage = preg_replace( '/[^a-zA-Z_]/', '', $_REQUEST['language'] );
     187} elseif ( isset( $GLOBALS['wp_local_package'] ) ) {
     188        $language = $GLOBALS['wp_local_package'];
    187189}
    188190
    189191switch($step) {
  • src/wp-admin/setup-config.php

     
    9090$language = '';
    9191if ( ! empty( $_REQUEST['language'] ) ) {
    9292        $language = preg_replace( '/[^a-zA-Z_]/', '', $_REQUEST['language'] );
     93} elseif ( isset( $GLOBALS['wp_local_package'] ) ) {
     94        $language = $GLOBALS['wp_local_package'];
    9395}
     96
    9497switch($step) {
    9598        case -1:
    9699                if ( wp_can_install_language_pack() && empty( $language ) && ( $languages = wp_get_available_translations() ) ) {