Ticket #12460: 12460_small.patch
| File 12460_small.patch, 12.8 KB (added by ocean90, 3 years ago) |
|---|
-
wp-admin/ms-admin.php
1 1 <?php 2 require_once( 'admin.php');2 require_once( 'admin.php' ); 3 3 4 4 if ( !is_multisite() ) 5 wp_die( __( 'Multisite support is not enabled.') );5 wp_die( __( 'Multisite support is not enabled.' ) ); 6 6 7 $title = __('Network Admin'); 8 $parent_file = 'ms-admin.php';7 if ( ! current_user_can( 'manage_network' ) ) 8 wp_die( __( 'You do not have permission to access this page.' ) ); 9 9 10 10 function index_css() { 11 11 wp_admin_css( 'css/dashboard' ); 12 12 } 13 13 add_action( 'admin_head', 'index_css' ); 14 14 15 require_once('admin-header.php'); 15 $title = __( 'Network Admin' ); 16 $parent_file = 'ms-admin.php'; 17 require_once( 'admin-header.php' ); 16 18 17 if ( ! current_user_can( 'manage_network' ) )18 wp_die( __('You do not have permission to access this page.') );19 20 global $wpdb;21 19 $c_users = get_user_count(); 22 20 $c_blogs = get_blog_count(); 23 21 … … 32 30 <h2><?php echo esc_html( $title ); ?></h2> 33 31 34 32 <ul class="subsubsub"> 35 <li><a href=" ms-sites.php#form-add-blog" class="rbutton"><strong><?php _e('Create a New Site'); ?></strong></a> | </li>36 <li><a href=" ms-users.php#form-add-user" class="rbutton"><?php _e('Create a New User'); ?></a></li>33 <li><a href="<?php echo esc_url( admin_url( 'ms-sites.php#form-add-site' ) ); ?>" class="rbutton"><strong><?php _e( 'Create a New Site' ); ?></strong></a> | </li> 34 <li><a href="<?php echo esc_url( admin_url( 'ms-users.php#form-add-user' ) ); ?>" class="rbutton"><?php _e( 'Create a New User' ); ?></a></li> 37 35 </ul> 38 <br clear= 'all'/>36 <br clear="all" /> 39 37 40 38 <p class="youhave"><?php echo $sentence; ?></p> 41 <?php do_action( 'wpmuadminresult', ''); ?>39 <?php do_action( 'wpmuadminresult', '' ); ?> 42 40 43 <form name="searchform" action=" ms-users.php" method="get">41 <form name="searchform" action="<?php echo esc_url( admin_url( 'ms-users.php' ) ); ?>" method="get"> 44 42 <p> 45 43 <input type="hidden" name="action" value="users" /> 46 44 <input type="text" name="s" value="" size="17" /> 47 <input class="button" type="submit" name="submit" value="<?php esc_attr_e( "Search Users"); ?>" />45 <input class="button" type="submit" name="submit" value="<?php esc_attr_e( 'Search Users' ); ?>" /> 48 46 </p> 49 47 </form> 50 48 51 <form name="searchform" action=" ms-sites.php" method="get">49 <form name="searchform" action="<?php echo esc_url( admin_url( 'ms-sites.php' ) ); ?>" method="get"> 52 50 <p> 53 51 <input type="hidden" name="action" value="blogs" /> 54 52 <input type="text" name="s" value="" size="17" /> 55 <input class="button" type="submit" name="blog_name" value="<?php esc_attr_e( "Search Sites"); ?>" />53 <input class="button" type="submit" name="blog_name" value="<?php esc_attr_e( 'Search Sites' ); ?>" /> 56 54 </p> 57 55 </form> 58 56 … … 61 59 </div><!-- rightnow --> 62 60 </div> 63 61 64 <?php include( 'admin-footer.php'); ?>62 <?php include( 'admin-footer.php' ); ?> -
wp-admin/ms-delete-site.php
17 17 } 18 18 } 19 19 20 $action = isset( $_POST['action'] ) ? $_POST['action'] : 'splash';21 22 20 $title = __( 'Delete Site' ); 23 21 $parent_file = 'tools.php'; 24 22 require_once( './admin-header.php' ); -
wp-admin/ms-edit.php
465 465 nocache_headers(); 466 466 header( 'Content-Type: text/html; charset=utf-8' ); 467 467 } 468 if ( $current_site->blog_id == $id )468 if ( $current_site->blog_id == $id && 'matureblog' != $_GET['action2'] && 'unmatureblog' != $_GET['action2'] ) 469 469 wp_die( __( 'You are not allowed to change the current site.' ) ); 470 470 ?> 471 471 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -
wp-admin/ms-options.php
4 4 if ( !is_multisite() ) 5 5 wp_die( __( 'Multisite support is not enabled.' ) ); 6 6 7 if ( ! current_user_can( 'manage_network_options' ) ) 8 wp_die( __( 'You do not have permission to access this page.' ) ); 9 7 10 $title = __( 'Network Options' ); 8 11 $parent_file = 'ms-admin.php'; 9 10 12 include( './admin-header.php' ); 11 13 12 if ( ! current_user_can( 'manage_network_options' ) )13 wp_die( __( 'You do not have permission to access this page.' ) );14 15 14 if (isset($_GET['updated'])) { 16 15 ?> 17 16 <div id="message" class="updated fade"><p><?php _e( 'Options saved.' ) ?></p></div> -
wp-admin/ms-sites.php
4 4 if ( !is_multisite() ) 5 5 wp_die( __( 'Multisite support is not enabled.' ) ); 6 6 7 $title = __( 'Sites' ); 8 $parent_file = 'ms-admin.php';7 if ( ! current_user_can( 'manage_sites' ) ) 8 wp_die( __( 'You do not have permission to access this page.' ) ); 9 9 10 10 wp_enqueue_script( 'admin-forms' ); 11 11 12 $title = __( 'Sites' ); 13 $parent_file = 'ms-admin.php'; 12 14 require_once( './admin-header.php' ); 13 15 14 if ( ! current_user_can( 'manage_sites' ) )15 wp_die( __( 'You do not have permission to access this page.' ) );16 17 16 $id = isset( $_GET['id'] ) ? intval( $_GET['id'] ) : 0; 18 17 19 18 if ( isset( $_GET['updated'] ) && $_GET['updated'] == 'true' && ! empty( $_GET['action'] ) ) { … … 125 124 <label><input type="radio" style="width:20px;" name="blog[public]" value="0" <?php checked( $details->public, 0 ); ?> /> <?php _e( 'No' ) ?></label> 126 125 </td> 127 126 </tr> 127 <?php if ( !$is_main_site ) { ?> 128 128 <tr class="form-field"> 129 129 <th scope="row"><?php _e( 'Archived' ); ?></th> 130 130 <td> … … 133 133 </td> 134 134 </tr> 135 135 <tr class="form-field"> 136 <th scope="row"><?php _e( 'Mature' ); ?></th>137 <td>138 <label><input type="radio" style="width:20px;" name="blog[mature]" value="1" <?php checked( $details->mature, 1 ); ?> /> <?php _e( 'Yes' ) ?></label>139 <label><input type="radio" style="width:20px;" name="blog[mature]" value="0" <?php checked( $details->mature, 0); ?> /> <?php _e( 'No' ) ?></label>140 </td>141 </tr>142 <tr class="form-field">143 136 <th scope="row"><?php _e( 'Spam' ); ?></th> 144 137 <td> 145 138 <label><input type="radio" style="width:20px;" name="blog[spam]" value="1" <?php checked( $details->spam, 1 ); ?> /> <?php _e( 'Yes' ) ?></label> … … 153 146 <label><input type="radio" style="width:20px;" name="blog[deleted]" value="0" <?php checked( $details->deleted, 0 ); ?> /> <?php _e( 'No' ) ?></label> 154 147 </td> 155 148 </tr> 149 <?php } ?> 150 <tr class="form-field"> 151 <th scope="row"><?php _e( 'Mature' ); ?></th> 152 <td> 153 <label><input type="radio" style="width:20px;" name="blog[mature]" value="1" <?php checked( $details->mature, 1 ); ?> /> <?php _e( 'Yes' ) ?></label> 154 <label><input type="radio" style="width:20px;" name="blog[mature]" value="0" <?php checked( $details->mature, 0); ?> /> <?php _e( 'No' ) ?></label> 155 </td> 156 </tr> 156 157 </table> 157 158 <p class="submit" style="text-align:center;"><input type="submit" name="Submit" value="<?php esc_attr_e( 'Update Options' ) ?>" /></p> 158 159 </div> … … 557 558 $actions[] = '<span class="activate"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&action2=activateblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to activate the site %s" ), $blogname ) ) ) ) . '">' . __( 'Activate' ) . '</a></span>'; 558 559 else 559 560 $actions[] = '<span class="activate"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&action2=deactivateblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to deactivate the site %s" ), $blogname ) ) ) ) . '">' . __( 'Deactivate' ) . '</a></span>'; 560 561 561 562 if ( get_blog_status( $blog['blog_id'], 'archived' ) == '1' ) 562 563 $actions[] = '<span class="archive"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&action2=unarchiveblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to unarchive the site %s." ), $blogname ) ) ) ) . '">' . __( 'Unarchive' ) . '</a></span>'; 563 564 else 564 565 $actions[] = '<span class="archive"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&action2=archiveblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to archive the site %s." ), $blogname ) ) ) ) . '">' . __( 'Archive' ) . '</a></span>'; 565 566 566 567 if ( get_blog_status( $blog['blog_id'], 'spam' ) == '1' ) 567 568 $actions[] = '<span class="spam"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&action2=unspamblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to unspam the site %s." ), $blogname ) ) ) ) . '">' . __( 'Not Spam' ) . '</a></span>'; 568 569 else 569 570 $actions[] = '<span class="spam"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&action2=spamblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to mark the site %s as spam." ), $blogname ) ) ) ) . '">' . __( 'Spam' ) . '</a></span>'; 570 571 if ( get_blog_status( $blog['blog_id'], 'mature' ) == '1' ) 572 $actions[] = '<span class="mature"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&action2=unmatureblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to unmature the site %s." ), $blogname ) ) ) ) . '">' . __( 'Not Mature' ) . '</a></span>'; 573 else 574 $actions[] = '<span class="mature"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&action2=matureblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to mark the site %s as mature." ), $blogname ) ) ) ) . '">' . __( 'Mature' ) . '</a></span>'; 575 571 576 572 $actions[] = '<span class="delete"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&action2=deleteblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to delete the site %s." ), $blogname ) ) ) ) . '">' . __( 'Delete' ) . '</a></span>'; 577 573 } 578 574 575 if ( get_blog_status( $blog['blog_id'], 'mature' ) == '1' ) 576 $actions[] = '<span class="mature"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&action2=unmatureblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to unmature the site %s." ), $blogname ) ) ) ) . '">' . __( 'Not Mature' ) . '</a></span>'; 577 else 578 $actions[] = '<span class="mature"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&action2=matureblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to mark the site %s as mature." ), $blogname ) ) ) ) . '">' . __( 'Mature' ) . '</a></span>'; 579 579 580 $actions[] = "<span class='view'><a href='" . esc_url( get_home_url( $blog['blog_id'] ) ) . "' rel='permalink'>" . __( 'Visit' ) . '</a>'; 580 581 581 582 if ( count( $actions ) ) : ?> -
wp-admin/ms-themes.php
1 1 <?php 2 2 require_once( './admin.php' ); 3 3 4 if ( ! current_user_can( 'manage_network_themes' ) ) 5 wp_die( __( 'You do not have permission to access this page.' ) ); 6 4 7 $title = __( 'Network Themes' ); 5 8 $parent_file = 'ms-admin.php'; 6 9 require_once( './admin-header.php' ); 7 10 8 if ( ! current_user_can( 'manage_network_themes' ) )9 wp_die( __( 'You do not have permission to access this page.' ) );10 11 11 if ( isset( $_GET['updated'] ) ) { 12 12 ?> 13 13 <div id="message" class="updated fade"><p><?php _e( 'Site themes saved.' ) ?></p></div> -
wp-admin/ms-users.php
4 4 if ( !is_multisite() ) 5 5 wp_die( __( 'Multisite support is not enabled.' ) ); 6 6 7 $title = __( 'Users' ); 8 $parent_file = 'ms-admin.php';7 if ( ! current_user_can( 'manage_network_users' ) ) 8 wp_die( __( 'You do not have permission to access this page.' ) ); 9 9 10 10 wp_enqueue_script( 'admin-forms' ); 11 11 12 $title = __( 'Users' ); 13 $parent_file = 'ms-admin.php'; 12 14 require_once( './admin-header.php' ); 13 15 14 if ( ! current_user_can( 'manage_network_users' ) )15 wp_die( __( 'You do not have permission to access this page.' ) );16 16 17 17 if ( isset( $_GET['updated'] ) && $_GET['updated'] == 'true' && ! empty( $_GET['action'] ) ) { 18 18 ?>
