WordPress.org

Make WordPress Core

Ticket #14147: 14147.patch

File 14147.patch, 3.9 KB (added by Viper007Bond, 3 years ago)

I still like tabs alot

  • wp-admin/ms-edit.php

     
    143143                        wp_die( __( 'You do not have permission to access this page.' ) ); 
    144144 
    145145                if ( is_array( $_POST['blog'] ) == false ) 
    146                         wp_die(  __( 'Can’t create an empty site.' ) ); 
     146                        wp_die( __( 'Can’t create an empty site.' ) ); 
    147147                $blog = $_POST['blog']; 
    148148                $domain = ''; 
    149149                if ( ! preg_match( '/(--)/', $blog['domain'] ) && preg_match( '|^([a-zA-Z0-9-])+$|', $blog['domain'] ) ) 
     
    193193                        if ( !is_super_admin( $user_id ) && get_user_option( 'primary_blog', $user_id ) == $dashboard_blog->blog_id ) 
    194194                                update_user_option( $user_id, 'primary_blog', $id, true ); 
    195195                        $content_mail = sprintf( __( "New site created by %1s\n\nAddress: http://%2s\nName: %3s"), $current_user->user_login , $newdomain . $path, stripslashes( $title ) ); 
    196                         wp_mail( get_site_option('admin_email'),  sprintf( __( '[%s] New Site Created' ), $current_site->site_name ), $content_mail, 'From: "Site Admin" <' . get_site_option( 'admin_email' ) . '>' ); 
     196                        wp_mail( get_site_option('admin_email'), sprintf( __( '[%s] New Site Created' ), $current_site->site_name ), $content_mail, 'From: "Site Admin" <' . get_site_option( 'admin_email' ) . '>' ); 
    197197                        wpmu_welcome_notification( $id, $user_id, $password, $title, array( 'public' => 1 ) ); 
    198198                        wp_redirect( add_query_arg( array( 'updated' => 'true', 'action' => 'add-blog' ), wp_get_referer() ) ); 
    199199                        exit(); 
     
    220220                                        $allowedthemes[$theme] = true; 
    221221                        } 
    222222                } 
    223                 update_option( 'allowedthemes',  $allowedthemes ); 
     223                update_option( 'allowedthemes', $allowedthemes ); 
    224224 
    225225                // options 
    226226                if ( is_array( $_POST['option'] ) ) { 
     
    241241                // home and siteurl 
    242242                if ( isset( $_POST['update_home_url'] ) && $_POST['update_home_url'] == 'update' ) { 
    243243                        $blog_address = get_blogaddress_by_domain( $_POST['blog']['domain'], $_POST['blog']['path'] ); 
    244                         if ( get_option( 'siteurl' ) !=  $blog_address ) 
     244                        if ( get_option( 'siteurl' ) != $blog_address ) 
    245245                                update_option( 'siteurl', $blog_address ); 
    246246 
    247247                        if ( get_option( 'home' ) != $blog_address ) 
     
    436436        break; 
    437437 
    438438        // Themes 
    439     case 'updatethemes': 
     439        case 'updatethemes': 
    440440        if ( ! current_user_can( 'manage_network_themes' ) ) 
    441441                wp_die( __( 'You do not have permission to access this page.' ) ); 
    442442 
    443         if ( is_array( $_POST['theme'] ) ) { 
     443                if ( is_array( $_POST['theme'] ) ) { 
    444444                        $themes = get_themes(); 
    445445                        reset( $themes ); 
    446446                        $allowed_themes = array(); 
     
    450450                        } 
    451451                        update_site_option( 'allowedthemes', $allowed_themes ); 
    452452                } 
    453                 wp_redirect( add_query_arg( array( 'updated' => 'true', 'action' => 'themes' ),  wp_get_referer() ) ); 
     453                wp_redirect( add_query_arg( array( 'updated' => 'true', 'action' => 'themes' ), wp_get_referer() ) ); 
    454454                exit(); 
    455455        break; 
    456456 
     
    504504                        echo '<div class="wrap">'; 
    505505                        confirm_delete_users( $_POST['allusers'] ); 
    506506                        echo '</div>'; 
    507             require_once( 'admin-footer.php' ); 
    508             exit(); 
     507                        require_once( 'admin-footer.php' ); 
     508                        exit(); 
    509509                } else { 
    510510                        wp_redirect( admin_url( 'ms-users.php' ) ); 
    511511                } 
     
    531531                                                        echo '<div class="wrap">'; 
    532532                                                        confirm_delete_users( $_POST['allusers'] ); 
    533533                                                        echo '</div>'; 
    534                                             require_once( 'admin-footer.php' ); 
    535                                             exit(); 
    536                                         break; 
     534                                                        require_once( 'admin-footer.php' ); 
     535                                                        exit(); 
     536                                                break; 
    537537 
    538538                                                case 'spam': 
    539539                                                        $user = new WP_User( $val ); 
     
    617617                $user_id = wpmu_create_user( esc_html( strtolower( $user['username'] ) ), $password, esc_html( $user['email'] ) ); 
    618618 
    619619                if ( false == $user_id ) 
    620                         wp_die( __( 'Duplicated username or email address.' ) ); 
     620                        wp_die( __( 'Duplicated username or email address.' ) ); 
    621621                else 
    622622                        wp_new_user_notification( $user_id, $password ); 
    623623