summaryrefslogtreecommitdiffstats
path: root/wp-includes
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-09-02 16:18:07 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-09-02 16:18:07 +0000
commitf922fc57d92a79f90d67997aef58b8928b67bd54 (patch)
tree80d4d8ea5203c538ae2b77859f6636c0b8c70fd0 /wp-includes
parentb92904fa4d621a075bb935da3e9df024fd70d16d (diff)
downloadwordpress-mu-f922fc57d92a79f90d67997aef58b8928b67bd54.tar.gz
wordpress-mu-f922fc57d92a79f90d67997aef58b8928b67bd54.tar.xz
wordpress-mu-f922fc57d92a79f90d67997aef58b8928b67bd54.zip
Check that we're not the "main blog" when deleting the current blog. Fixes #637
git-svn-id: http://svn.automattic.com/wordpress-mu/branches/2.6@1463 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes')
-rw-r--r--wp-includes/wpmu-functions.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/wp-includes/wpmu-functions.php b/wp-includes/wpmu-functions.php
index 6f570bd..6d5227d 100644
--- a/wp-includes/wpmu-functions.php
+++ b/wp-includes/wpmu-functions.php
@@ -1700,7 +1700,9 @@ class delete_blog {
}
function admin_footer() {
- global $wpdb;
+ global $wpdb, $current_blog, $current_site;
+ if( $current_blog->domain . $current_blog->path == $current_site->domain . $current_site->path )
+ return false;
if( $this->reallydeleteblog == true ) {
wpmu_delete_blog( $wpdb->blogid );
@@ -1708,7 +1710,9 @@ class delete_blog {
}
function admin_menu() {
- add_submenu_page('options-general.php', __('Delete Blog'), __('Delete Blog'), 'manage_options', 'delete-blog', array(&$this, 'plugin_content'));
+ global $current_blog, $current_site;
+ if( $current_blog->domain . $current_blog->path != $current_site->domain . $current_site->path )
+ add_submenu_page('options-general.php', __('Delete Blog'), __('Delete Blog'), 'manage_options', 'delete-blog', array(&$this, 'plugin_content'));
}
function plugin_content() {