Changeset 1463

Show
Ignore:
Timestamp:
09/02/08 16:18:07 (3 months ago)
Author:
donncha
Message:

Check that we're not the "main blog" when deleting the current blog. Fixes #637

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2.6/wp-includes/wpmu-functions.php

    r1460 r1463  
    17011701 
    17021702        function admin_footer() { 
    1703                 global $wpdb; 
     1703                global $wpdb, $current_blog, $current_site; 
     1704                if( $current_blog->domain . $current_blog->path == $current_site->domain . $current_site->path ) 
     1705                        return false; 
    17041706 
    17051707                if( $this->reallydeleteblog == true ) { 
     
    17091711 
    17101712        function admin_menu() { 
    1711                 add_submenu_page('options-general.php', __('Delete Blog'), __('Delete Blog'), 'manage_options', 'delete-blog', array(&$this, 'plugin_content')); 
     1713                global $current_blog, $current_site; 
     1714                if( $current_blog->domain . $current_blog->path != $current_site->domain . $current_site->path ) 
     1715                        add_submenu_page('options-general.php', __('Delete Blog'), __('Delete Blog'), 'manage_options', 'delete-blog', array(&$this, 'plugin_content')); 
    17121716        } 
    17131717