Ticket #14147: 14147.patch
| File 14147.patch, 3.9 KB (added by Viper007Bond, 3 years ago) |
|---|
-
wp-admin/ms-edit.php
143 143 wp_die( __( 'You do not have permission to access this page.' ) ); 144 144 145 145 if ( is_array( $_POST['blog'] ) == false ) 146 wp_die( __( 'Can’t create an empty site.' ) );146 wp_die( __( 'Can’t create an empty site.' ) ); 147 147 $blog = $_POST['blog']; 148 148 $domain = ''; 149 149 if ( ! preg_match( '/(--)/', $blog['domain'] ) && preg_match( '|^([a-zA-Z0-9-])+$|', $blog['domain'] ) ) … … 193 193 if ( !is_super_admin( $user_id ) && get_user_option( 'primary_blog', $user_id ) == $dashboard_blog->blog_id ) 194 194 update_user_option( $user_id, 'primary_blog', $id, true ); 195 195 $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' ) . '>' ); 197 197 wpmu_welcome_notification( $id, $user_id, $password, $title, array( 'public' => 1 ) ); 198 198 wp_redirect( add_query_arg( array( 'updated' => 'true', 'action' => 'add-blog' ), wp_get_referer() ) ); 199 199 exit(); … … 220 220 $allowedthemes[$theme] = true; 221 221 } 222 222 } 223 update_option( 'allowedthemes', $allowedthemes );223 update_option( 'allowedthemes', $allowedthemes ); 224 224 225 225 // options 226 226 if ( is_array( $_POST['option'] ) ) { … … 241 241 // home and siteurl 242 242 if ( isset( $_POST['update_home_url'] ) && $_POST['update_home_url'] == 'update' ) { 243 243 $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 ) 245 245 update_option( 'siteurl', $blog_address ); 246 246 247 247 if ( get_option( 'home' ) != $blog_address ) … … 436 436 break; 437 437 438 438 // Themes 439 case 'updatethemes':439 case 'updatethemes': 440 440 if ( ! current_user_can( 'manage_network_themes' ) ) 441 441 wp_die( __( 'You do not have permission to access this page.' ) ); 442 442 443 if ( is_array( $_POST['theme'] ) ) {443 if ( is_array( $_POST['theme'] ) ) { 444 444 $themes = get_themes(); 445 445 reset( $themes ); 446 446 $allowed_themes = array(); … … 450 450 } 451 451 update_site_option( 'allowedthemes', $allowed_themes ); 452 452 } 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() ) ); 454 454 exit(); 455 455 break; 456 456 … … 504 504 echo '<div class="wrap">'; 505 505 confirm_delete_users( $_POST['allusers'] ); 506 506 echo '</div>'; 507 require_once( 'admin-footer.php' );508 exit();507 require_once( 'admin-footer.php' ); 508 exit(); 509 509 } else { 510 510 wp_redirect( admin_url( 'ms-users.php' ) ); 511 511 } … … 531 531 echo '<div class="wrap">'; 532 532 confirm_delete_users( $_POST['allusers'] ); 533 533 echo '</div>'; 534 require_once( 'admin-footer.php' );535 exit();536 break;534 require_once( 'admin-footer.php' ); 535 exit(); 536 break; 537 537 538 538 case 'spam': 539 539 $user = new WP_User( $val ); … … 617 617 $user_id = wpmu_create_user( esc_html( strtolower( $user['username'] ) ), $password, esc_html( $user['email'] ) ); 618 618 619 619 if ( false == $user_id ) 620 wp_die( __( 'Duplicated username or email address.' ) );620 wp_die( __( 'Duplicated username or email address.' ) ); 621 621 else 622 622 wp_new_user_notification( $user_id, $password ); 623 623