Ticket #605: xhtml-wpdie.patch
| File xhtml-wpdie.patch, 4.4 kB (added by momo360modena, 4 months ago) |
|---|
-
wpmu-blogs.php
old new 8 8 9 9 require_once('admin-header.php'); 10 10 if( is_site_admin() == false ) { 11 wp_die( __(' <p>You do not have permission to access this page.</p>') );11 wp_die( __('You do not have permission to access this page.') ); 12 12 } 13 13 $id = intval( $_GET['id'] ); 14 14 -
wpmu-edit.php
old new 1 1 <?php 2 2 require_once('admin.php'); 3 3 if( is_site_admin() == false ) { 4 wp_die( __(' <p>You do not have permission to access this page.</p>') );4 wp_die( __('You do not have permission to access this page.') ); 5 5 } 6 6 7 7 do_action('wpmuadminedit', ''); … … 92 92 $email = wp_specialchars( $blog['email'] ); 93 93 94 94 if ( empty($domain) || empty($email)) 95 wp_die( __( "<p>Missing blog address or email address.</p>") );95 wp_die( __('Missing blog address or email address.') ); 96 96 if( !is_email( $email ) ) 97 wp_die( __( "<p>Invalid email address</p>") );97 wp_die( __('Invalid email address') ); 98 98 99 if( constant( "VHOST") == 'yes' ) {99 if( constant('VHOST') == 'yes' ) { 100 100 $newdomain = $domain.".".$current_site->domain; 101 101 $path = $base; 102 102 } else { … … 109 109 $password = generate_random_password(); 110 110 $user_id = wpmu_create_user( $domain, $password, $email ); 111 111 if(false == $user_id) { 112 wp_die( __( "<p>There was an error creating the user</p>") );112 wp_die( __('There was an error creating the user') ); 113 113 } else { 114 114 wp_new_user_notification($user_id, $password); 115 115 } … … 126 126 wp_redirect( add_query_arg( array('updated' => 'true', 'action' => 'add-blog'), $_SERVER['HTTP_REFERER'] ) ); 127 127 exit(); 128 128 } else { 129 die( $blog_id->get_error_message() );129 wp_die( $blog_id->get_error_message() ); 130 130 } 131 131 break; 132 132 133 133 case "updateblog": 134 134 check_admin_referer('editblog'); 135 135 if( empty( $_POST ) ) 136 wp_die( __( "You probably need to go back to the <a href='wpmu-blogs.php'>blogs page</a>") );136 wp_die( __('You probably need to go back to the <a href="wpmu-blogs.php">blogs page</a>') ); 137 137 138 138 // themes 139 139 if( is_array( $_POST['theme'] ) ) { … … 427 427 428 428 $user = $_POST['user']; 429 429 if ( empty($user['username']) && empty($user['email']) ) { 430 wp_die( __( "<p>Missing username and email.</p>") );430 wp_die( __('Missing username and email.') ); 431 431 } elseif ( empty($user['username']) ) { 432 wp_die( __( "<p>Missing username.</p>") );432 wp_die( __('Missing username.') ); 433 433 } elseif ( empty($user['email']) ) { 434 wp_die( __( "<p>Missing email.</p>") );434 wp_die( __('<p>Missing email.') ); 435 435 } 436 436 437 437 $password = generate_random_password(); 438 438 $user_id = wpmu_create_user(wp_specialchars( strtolower( $user['username'] ) ), $password, wp_specialchars( $user['email'] ) ); 439 439 440 440 if( false == $user_id ) { 441 wp_die( __( "<p>Duplicated username or email address.</p>") );441 wp_die( __('Duplicated username or email address.') ); 442 442 } else { 443 443 wp_new_user_notification($user_id, $password); 444 444 } -
wpmu-options.php
old new 6 6 include('admin-header.php'); 7 7 8 8 if( is_site_admin() == false ) { 9 wp_die( __(' <p>You do not have permission to access this page.</p>') );9 wp_die( __('You do not have permission to access this page.') ); 10 10 } 11 11 12 12 if (isset($_GET['updated'])) { -
wpmu-themes.php
old new 6 6 require_once('admin-header.php'); 7 7 8 8 if( is_site_admin() == false ) { 9 wp_die( __(' <p>You do not have permission to access this page.</p>') );9 wp_die( __('You do not have permission to access this page.') ); 10 10 } 11 11 12 12 if (isset($_GET['updated'])) { -
wpmu-upgrade-site.php
old new 11 11 require_once('admin-header.php'); 12 12 13 13 if( is_site_admin() == false ) { 14 wp_die( __(' <p>You do not have permission to access this page.</p>') );14 wp_die( __('You do not have permission to access this page.') ); 15 15 } 16 16 17 17 echo '<div class="wrap">';
