Ticket #14147: 14147.2.diff
File 14147.2.diff, 4.0 KB (added by , 14 years ago) |
---|
-
wp-admin/network/site-new.php
24 24 wp_die( __( 'You do not have permission to access this page.' ) ); 25 25 26 26 if ( is_array( $_POST['blog'] ) == false ) 27 wp_die( 27 wp_die( __( 'Can’t create an empty site.' ) ); 28 28 $blog = $_POST['blog']; 29 29 $domain = ''; 30 30 if ( ! preg_match( '/(--)/', $blog['domain'] ) && preg_match( '|^([a-zA-Z0-9-])+$|', $blog['domain'] ) ) … … 73 73 if ( !is_super_admin( $user_id ) && !get_user_option( 'primary_blog', $user_id ) ) 74 74 update_user_option( $user_id, 'primary_blog', $id, true ); 75 75 $content_mail = sprintf( __( "New site created by %1s\n\nAddress: http://%2s\nName: %3s"), $current_user->user_login , $newdomain . $path, stripslashes( $title ) ); 76 wp_mail( get_site_option('admin_email'), 76 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' ) . '>' ); 77 77 wpmu_welcome_notification( $id, $user_id, $password, $title, array( 'public' => 1 ) ); 78 78 wp_redirect( add_query_arg( array('update' => 'added'), 'site-new.php' ) ); 79 79 exit; -
wp-admin/network/site-info.php
35 35 36 36 if ( isset( $_POST['update_home_url'] ) && $_POST['update_home_url'] == 'update' ) { 37 37 $blog_address = get_blogaddress_by_domain( $_POST['blog']['domain'], $_POST['blog']['path'] ); 38 if ( get_option( 'siteurl' ) != 38 if ( get_option( 'siteurl' ) != $blog_address ) 39 39 update_option( 'siteurl', $blog_address ); 40 40 41 41 if ( get_option( 'home' ) != $blog_address ) … … 149 149 150 150 </div> 151 151 <?php 152 require('../admin-footer.php'); 153 No newline at end of file 152 require('../admin-footer.php'); -
wp-admin/network/edit.php
302 302 303 303 // Themes 304 304 case 'updatethemes': 305 if ( ! current_user_can( 'manage_network_themes' ) )306 wp_die( __( 'You do not have permission to access this page.' ) );305 if ( ! current_user_can( 'manage_network_themes' ) ) 306 wp_die( __( 'You do not have permission to access this page.' ) ); 307 307 308 308 if ( is_array( $_POST['theme'] ) ) { 309 309 $themes = get_themes(); … … 315 315 } 316 316 update_site_option( 'allowedthemes', $allowed_themes ); 317 317 } 318 wp_redirect( add_query_arg( array( 'updated' => 'true', 'action' => 'themes' ), 318 wp_redirect( add_query_arg( array( 'updated' => 'true', 'action' => 'themes' ), wp_get_referer() ) ); 319 319 exit(); 320 320 break; 321 321 … … 482 482 $user_id = wpmu_create_user( esc_html( strtolower( $user['username'] ) ), $password, esc_html( $user['email'] ) ); 483 483 484 484 if ( false == $user_id ) 485 485 wp_die( __( 'Duplicated username or email address.' ) ); 486 486 else 487 487 wp_new_user_notification( $user_id, $password ); 488 488 -
wp-admin/network/site-themes.php
40 40 $allowedthemes[$theme] = true; 41 41 } 42 42 } 43 update_option( 'allowedthemes', 43 update_option( 'allowedthemes', $allowedthemes ); 44 44 45 45 restore_current_blog(); 46 46 wp_redirect( add_query_arg( array( 'update' => 'updated', 'id' => $id ), 'site-themes.php') ); … … 117 117 118 118 </div> 119 119 <?php 120 require('../admin-footer.php'); 121 No newline at end of file 120 require('../admin-footer.php');