Changeset 13609 for trunk/wp-admin/ms-edit.php
- Timestamp:
- 03/06/2010 06:31:10 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/ms-edit.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/ms-edit.php
r13511 r13609 222 222 delete_option( 'rewrite_rules' ); 223 223 224 // update blogs count 225 delete_site_transient( "blog_count" ); 226 224 227 // update blogs table 225 228 $blog_data = stripslashes_deep($_POST[ 'blog' ]); … … 293 296 if ( $id != '0' && $id != $current_site->blog_id ) 294 297 wpmu_delete_blog( $id, true ); 295 298 296 299 wp_redirect( add_query_arg( array('updated' => 'true', 'action' => 'delete'), $_POST[ 'ref' ] ) ); 297 300 exit(); … … 299 302 300 303 case "allblogs": 301 check_admin_referer('allblogs'); 302 if ( ! current_user_can( 'manage_sites' ) ) 303 wp_die( __('You do not have permission to access this page.') ); 304 if ( isset($_POST['doaction']) || isset($_POST['doaction2']) ) { 305 check_admin_referer('bulk-sites'); 306 307 if ( ! current_user_can( 'manage_sites' ) ) 308 wp_die( __('You do not have permission to access this page.') ); 309 310 if ( $_GET['action'] != -1 || $_POST['action2'] != -1 ) 311 $doaction = $doaction = ($_POST['action'] != -1) ? $_POST['action'] : $_POST['action2']; 312 304 313 305 314 foreach ( (array) $_POST[ 'allblogs' ] as $key => $val ) { 306 315 if ( $val != '0' && $val != $current_site->blog_id ) { 307 if ( isset($_POST['allblog_delete']) ) { 308 $blogfunction = 'all_delete'; 309 wpmu_delete_blog( $val, true ); 310 } elseif ( isset($_POST['allblog_spam']) ) { 311 $blogfunction = 'all_spam'; 312 update_blog_status( $val, "spam", '1', 0 ); 313 set_time_limit(60); 314 } elseif ( isset($_POST['allblog_notspam']) ) { 315 $blogfunction = 'all_notspam'; 316 update_blog_status( $val, "spam", '0', 0 ); 317 set_time_limit(60); 316 switch ( $doaction ) { 317 case 'delete': 318 $blogfunction = 'all_delete'; 319 wpmu_delete_blog( $val, true ); 320 break; 321 case 'spam': 322 $blogfunction = 'all_spam'; 323 update_blog_status( $val, "spam", '1', 0 ); 324 set_time_limit(60); 325 break; 326 case 'notspam': 327 $blogfunction = 'all_notspam'; 328 update_blog_status( $val, "spam", '0', 0 ); 329 set_time_limit(60); 330 break; 318 331 } 319 } 320 } 332 } else { 333 wp_die( __('You are not allowed to change one of this sites.') ); 334 exit(); 335 }; 336 }; 321 337 322 338 wp_redirect( add_query_arg( array('updated' => 'true', 'action' => $blogfunction), $_SERVER['HTTP_REFERER'] ) ); 323 339 exit(); 340 341 } else { 342 wp_redirect( admin_url("ms-sites.php") ); 343 } 324 344 break; 325 345 … … 398 418 update_blog_status( $id, 'mature', '0' ); 399 419 do_action( 'unmature_blog', $id ); 400 401 420 wp_redirect( add_query_arg( array('updated' => 'true', 'action' => 'umature'), $_POST['ref'] ) ); 402 421 exit();
Note: See TracChangeset
for help on using the changeset viewer.