Changeset 13301
- Timestamp:
- 02/22/2010 06:41:38 PM (15 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 8 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/ms.php
r13297 r13301 653 653 printf("<div id='update-nag'>" . __("Hi %s! You're logged in as a site administrator.") . "</div>", $current_user->user_login); 654 654 if ( get_site_option( 'wpmu_upgrade_site' ) != $wp_db_version ) { 655 echo "<div id='update-nag'>" . __( 'Thank you for Upgrading! Please visit the <a href="ms-upgrade- site.php">Upgrade Site</a> page to update all your blogs.' ) . "</div>";655 echo "<div id='update-nag'>" . __( 'Thank you for Upgrading! Please visit the <a href="ms-upgrade-network.php">Upgrade Network</a> page to update all your blogs.' ) . "</div>"; 656 656 } 657 657 } -
trunk/wp-admin/menu.php
r13257 r13301 28 28 if ( is_multisite() && is_super_admin() ) { 29 29 /* translators: Network menu item */ 30 $menu[0] = array(__('Network'), ' super_admin', 'ms-admin.php', '', 'menu-top menu-top-first', 'menu-site', 'div');31 $submenu[ 'ms-admin.php' ][1] = array( __('Admin'), ' super_admin', 'ms-admin.php' );30 $menu[0] = array(__('Network'), 'manage_network', 'ms-admin.php', '', 'menu-top menu-top-first', 'menu-site', 'div'); 31 $submenu[ 'ms-admin.php' ][1] = array( __('Admin'), 'manage_network', 'ms-admin.php' ); 32 32 /* translators: Sites menu item */ 33 $submenu[ 'ms-admin.php' ][5] = array( __('Sites'), ' super_admin', 'ms-sites.php' );34 $submenu[ 'ms-admin.php' ][10] = array( __('Users'), ' super_admin', 'ms-users.php' );35 $submenu[ 'ms-admin.php' ][20] = array( __('Themes'), ' super_admin', 'ms-themes.php' );36 $submenu[ 'ms-admin.php' ][25] = array( __('Options'), ' super_admin', 'ms-options.php' );37 $submenu[ 'ms-admin.php' ][30] = array( __('Upgrade'), ' super_admin', 'ms-upgrade-site.php' );33 $submenu[ 'ms-admin.php' ][5] = array( __('Sites'), 'manage_sites', 'ms-sites.php' ); 34 $submenu[ 'ms-admin.php' ][10] = array( __('Users'), 'manage_network_users', 'ms-users.php' ); 35 $submenu[ 'ms-admin.php' ][20] = array( __('Themes'), 'manage_network_themes', 'ms-themes.php' ); 36 $submenu[ 'ms-admin.php' ][25] = array( __('Options'), 'manage_network_options', 'ms-options.php' ); 37 $submenu[ 'ms-admin.php' ][30] = array( __('Upgrade'), 'manage_network', 'ms-upgrade-network.php' ); 38 38 39 39 $menu[1] = array( '', 'read', 'separator1', '', 'wp-menu-separator' ); -
trunk/wp-admin/ms-admin.php
r13114 r13301 15 15 require_once('admin-header.php'); 16 16 17 if ( ! is_super_admin() )17 if ( ! current_user_can( 'manage_network' ) ) 18 18 wp_die( __('You do not have permission to access this page.') ); 19 19 -
trunk/wp-admin/ms-edit.php
r13297 r13301 4 4 if ( !is_multisite() ) 5 5 wp_die( __('Multisite support is not enabled.') ); 6 7 if ( !is_super_admin() )8 wp_die( __('You do not have permission to access this page.') );9 6 10 7 do_action('wpmuadminedit', ''); … … 21 18 case "siteoptions": 22 19 check_admin_referer('siteoptions'); 20 if ( ! current_user_can( 'manage_network_options' ) ) 21 wp_die( __('You do not have permission to access this page.') ); 22 23 23 if ( empty( $_POST ) ) 24 24 wp_die( __("You probably need to go back to the <a href='ms-options.php'>options page</a>") ); … … 138 138 check_admin_referer('add-blog'); 139 139 140 if ( ! current_user_can( 'manage_sites' ) ) 141 wp_die( __('You do not have permission to access this page.') ); 142 140 143 if ( is_array( $_POST[ 'blog' ] ) == false ) 141 144 wp_die( "Can't create an empty blog." ); … … 188 191 case "updateblog": 189 192 check_admin_referer('editblog'); 193 if ( ! current_user_can( 'manage_sites' ) ) 194 wp_die( __('You do not have permission to access this page.') ); 195 190 196 if ( empty( $_POST ) ) 191 197 wp_die( __('You probably need to go back to the <a href="ms-sites.php">sites page</a>') ); … … 289 295 case "deleteblog": 290 296 check_admin_referer('deleteblog'); 297 if ( ! current_user_can( 'manage_sites' ) ) 298 wp_die( __('You do not have permission to access this page.') ); 299 291 300 if ( $id != '0' && $id != $current_site->blog_id ) 292 301 wpmu_delete_blog( $id, true ); … … 298 307 case "allblogs": 299 308 check_admin_referer('allblogs'); 309 if ( ! current_user_can( 'manage_sites' ) ) 310 wp_die( __('You do not have permission to access this page.') ); 311 300 312 foreach ( (array) $_POST[ 'allblogs' ] as $key => $val ) { 301 313 if ( $val != '0' && $val != $current_site->blog_id ) { … … 321 333 case "archiveblog": 322 334 check_admin_referer('archiveblog'); 335 if ( ! current_user_can( 'manage_sites' ) ) 336 wp_die( __('You do not have permission to access this page.') ); 337 323 338 update_blog_status( $id, "archived", '1' ); 324 339 do_action( "archive_blog", $id ); … … 329 344 case "unarchiveblog": 330 345 check_admin_referer('unarchiveblog'); 346 if ( ! current_user_can( 'manage_sites' ) ) 347 wp_die( __('You do not have permission to access this page.') ); 348 331 349 do_action( "unarchive_blog", $id ); 332 350 update_blog_status( $id, "archived", '0' ); … … 337 355 case "activateblog": 338 356 check_admin_referer('activateblog'); 357 if ( ! current_user_can( 'manage_sites' ) ) 358 wp_die( __('You do not have permission to access this page.') ); 359 339 360 update_blog_status( $id, "deleted", '0' ); 340 361 do_action( "activate_blog", $id ); … … 345 366 case "deactivateblog": 346 367 check_admin_referer('deactivateblog'); 368 if ( ! current_user_can( 'manage_sites' ) ) 369 wp_die( __('You do not have permission to access this page.') ); 370 347 371 do_action( "deactivate_blog", $id ); 348 372 update_blog_status( $id, "deleted", '1' ); … … 353 377 case "unspamblog": 354 378 check_admin_referer('unspamblog'); 379 if ( ! current_user_can( 'manage_sites' ) ) 380 wp_die( __('You do not have permission to access this page.') ); 381 355 382 update_blog_status( $id, "spam", '0' ); 356 383 wp_redirect( add_query_arg( array('updated' => 'true', 'action' => 'unspam'), $_POST['ref'] ) ); … … 360 387 case "spamblog": 361 388 check_admin_referer('spamblog'); 389 if ( ! current_user_can( 'manage_sites' ) ) 390 wp_die( __('You do not have permission to access this page.') ); 391 362 392 update_blog_status( $id, "spam", '1' ); 363 393 wp_redirect( add_query_arg( array('updated' => 'true', 'action' => 'spam'), $_POST['ref'] ) ); … … 382 412 // Themes 383 413 case "updatethemes": 414 if ( ! current_user_can( 'manage_network_themes' ) ) 415 wp_die( __('You do not have permission to access this page.') ); 416 384 417 if ( is_array( $_POST['theme'] ) ) { 385 418 $themes = get_themes(); … … 439 472 case "allusers": 440 473 check_admin_referer('allusers'); 474 if ( ! current_user_can( 'manage_network_users' ) ) 475 wp_die( __('You do not have permission to access this page.') ); 476 441 477 if ( isset($_POST['alluser_delete']) ) { 442 478 require_once('admin-header.php'); … … 488 524 case "adduser": 489 525 check_admin_referer('add-user'); 526 if ( ! current_user_can( 'manage_network_users' ) ) 527 wp_die( __('You do not have permission to access this page.') ); 490 528 491 529 if ( is_array( $_POST[ 'user' ] ) == false ) -
trunk/wp-admin/ms-options.php
r13154 r13301 10 10 include('admin-header.php'); 11 11 12 if ( ! is_super_admin() )12 if ( ! current_user_can( 'manage_network_options' ) ) 13 13 wp_die( __('You do not have permission to access this page.') ); 14 14 -
trunk/wp-admin/ms-sites.php
r13106 r13301 12 12 require_once('admin-header.php'); 13 13 14 if ( ! is_super_admin() )14 if ( ! current_user_can( 'manage_sites' ) ) 15 15 wp_die( __('You do not have permission to access this page.') ); 16 16 -
trunk/wp-admin/ms-themes.php
r13106 r13301 6 6 require_once('admin-header.php'); 7 7 8 if ( ! is_super_admin() )8 if ( ! current_user_can( 'manage_network_themes' ) ) 9 9 wp_die( __('You do not have permission to access this page.') ); 10 10 -
trunk/wp-admin/ms-upgrade-network.php
r13292 r13301 7 7 require_once( ABSPATH . WPINC . '/http.php' ); 8 8 9 $title = __('Upgrade Site');9 $title = __('Upgrade Network'); 10 10 $parent_file = 'ms-admin.php'; 11 11 require_once('admin-header.php'); 12 12 13 if ( ! is_super_admin() )13 if ( ! current_user_can( 'manage_network' ) ) 14 14 wp_die( __('You do not have permission to access this page.') ); 15 15 16 16 echo '<div class="wrap">'; 17 17 screen_icon(); 18 echo '<h2>'.__('Upgrade Site').'</h2>';18 echo '<h2>'.__('Upgrade Network').'</h2>'; 19 19 20 20 $action = isset($_GET['action']) ? $_GET['action'] : 'show'; … … 44 44 } 45 45 echo "</ul>"; 46 ?><p><?php _e("If your browser doesn't start loading the next page automatically click this link:"); ?> <a class="button" href="ms-upgrade- site.php?action=upgrade&n=<?php echo ($n + 5) ?>"><?php _e("Next Blogs"); ?></a></p>46 ?><p><?php _e("If your browser doesn't start loading the next page automatically click this link:"); ?> <a class="button" href="ms-upgrade-network.php?action=upgrade&n=<?php echo ($n + 5) ?>"><?php _e("Next Sites"); ?></a></p> 47 47 <script type='text/javascript'> 48 48 <!-- 49 49 function nextpage() { 50 location.href = "ms-upgrade- site.php?action=upgrade&n=<?php echo ($n + 5) ?>";50 location.href = "ms-upgrade-network.php?action=upgrade&n=<?php echo ($n + 5) ?>"; 51 51 } 52 52 setTimeout( "nextpage()", 250 ); … … 59 59 case 'show': 60 60 default: 61 ?><p><?php _e("You can upgrade all the blogs on your site through this page. It works by calling the upgrade script of each blogautomatically. Hit the link below to upgrade."); ?></p>62 <p><a class="button" href="ms-upgrade- site.php?action=upgrade"><?php _e("Upgrade Site"); ?></a></p><?php61 ?><p><?php _e("You can upgrade all the sites on your network through this page. It works by calling the upgrade script of each site automatically. Hit the link below to upgrade."); ?></p> 62 <p><a class="button" href="ms-upgrade-network.php?action=upgrade"><?php _e("Upgrade Network"); ?></a></p><?php 63 63 do_action( 'wpmu_upgrade_page' ); 64 64 break; -
trunk/wp-admin/ms-users.php
r13297 r13301 12 12 require_once('admin-header.php'); 13 13 14 if ( ! is_super_admin() )14 if ( ! current_user_can( 'manage_network_users' ) ) 15 15 wp_die( __('You do not have permission to access this page.') ); 16 16
Note: See TracChangeset
for help on using the changeset viewer.