Ticket #605: xhtml-wpdie.patch

File xhtml-wpdie.patch, 4.4 kB (added by momo360modena, 4 months ago)
  • wpmu-blogs.php

    old new  
    88 
    99require_once('admin-header.php'); 
    1010if( 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.') ); 
    1212} 
    1313$id = intval( $_GET['id'] ); 
    1414 
  • wpmu-edit.php

    old new  
    11<?php 
    22require_once('admin.php'); 
    33if( 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.') ); 
    55} 
    66 
    77do_action('wpmuadminedit', ''); 
     
    9292                $email = wp_specialchars( $blog['email'] ); 
    9393                 
    9494                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.') ); 
    9696                if( !is_email( $email ) )  
    97                         wp_die( __("<p>Invalid email address</p>") );  
     97                        wp_die( __('Invalid email address') );  
    9898                 
    99                 if( constant( "VHOST" ) == 'yes' ) { 
     99                if( constant('VHOST') == 'yes' ) { 
    100100                        $newdomain = $domain.".".$current_site->domain; 
    101101                        $path = $base; 
    102102                } else { 
     
    109109                        $password = generate_random_password(); 
    110110                        $user_id = wpmu_create_user( $domain, $password, $email ); 
    111111                        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') ); 
    113113                        } else { 
    114114                                wp_new_user_notification($user_id, $password); 
    115115                        } 
     
    126126                        wp_redirect( add_query_arg( array('updated' => 'true', 'action' => 'add-blog'), $_SERVER['HTTP_REFERER'] ) ); 
    127127                        exit(); 
    128128                } else { 
    129                         die( $blog_id->get_error_message() ); 
     129                        wp_die( $blog_id->get_error_message() ); 
    130130                } 
    131131        break; 
    132132         
    133133        case "updateblog": 
    134134                check_admin_referer('editblog'); 
    135135                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>') ); 
    137137 
    138138                // themes 
    139139                if( is_array( $_POST['theme'] ) ) { 
     
    427427 
    428428                $user = $_POST['user']; 
    429429                if ( empty($user['username']) && empty($user['email']) ) { 
    430                         wp_die( __("<p>Missing username and email.</p>") ); 
     430                        wp_die( __('Missing username and email.') ); 
    431431                } elseif ( empty($user['username']) ) { 
    432                         wp_die( __("<p>Missing username.</p>") ); 
     432                        wp_die( __('Missing username.') ); 
    433433                } elseif ( empty($user['email']) ) { 
    434                         wp_die( __("<p>Missing email.</p>") ); 
     434                        wp_die( __('<p>Missing email.') ); 
    435435                } 
    436436 
    437437                $password = generate_random_password(); 
    438438                $user_id = wpmu_create_user(wp_specialchars( strtolower( $user['username'] ) ), $password, wp_specialchars( $user['email'] ) ); 
    439439 
    440440                if( false == $user_id ) { 
    441                         wp_die( __("<p>Duplicated username or email address.</p>") ); 
     441                        wp_die( __('Duplicated username or email address.') ); 
    442442                } else { 
    443443                        wp_new_user_notification($user_id, $password); 
    444444                } 
  • wpmu-options.php

    old new  
    66include('admin-header.php'); 
    77 
    88if( 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.') ); 
    1010} 
    1111 
    1212if (isset($_GET['updated'])) { 
  • wpmu-themes.php

    old new  
    66require_once('admin-header.php'); 
    77 
    88if( 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.') ); 
    1010} 
    1111 
    1212if (isset($_GET['updated'])) { 
  • wpmu-upgrade-site.php

    old new  
    1111require_once('admin-header.php'); 
    1212 
    1313if( 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.') ); 
    1515} 
    1616 
    1717echo '<div class="wrap">';