Index: trunk/lib/MT/CMS/Asset.pm
===================================================================
--- trunk/lib/MT/CMS/Asset.pm (revision 2802)
+++ trunk/lib/MT/CMS/Asset.pm (revision 3082)
@@ -151,5 +151,5 @@
             push @blog_ids, $_->blog_id
               foreach grep { $_->can_edit_assets } @perms;
-            $terms{blog_id} = \@blog_ids;
+            $terms{blog_id} = @blog_ids ? \@blog_ids : 0;
         }
     }
Index: trunk/lib/MT/CMS/Blog.pm
===================================================================
--- trunk/lib/MT/CMS/Blog.pm (revision 3001)
+++ trunk/lib/MT/CMS/Blog.pm (revision 3082)
@@ -532,5 +532,5 @@
     my $type = $app->param('_type') || 'entry';
     my @ids  = $app->param('id');
-    $app->{goback} = "window.location='" . $app->return_uri . "'";
+    $app->{goback} = $app->return_uri;
     $app->{value} ||= $app->translate('Go Back');
     if ( $type eq 'entry' ) {
@@ -611,7 +611,5 @@
                 $edit_type = $entry ? $entry->class : 'entry';
             }
-            $app->{goback} =
-              "window.location='"
-              . $app->object_edit_uri( $edit_type, $obj_id ) . "'";
+            $app->{goback} = $app->object_edit_uri( $edit_type, $obj_id );
             $app->{value} ||= $app->translate('Go Back');
         }
@@ -691,8 +689,20 @@
     elsif ($type) {
         my $special = 0;
-        my @options = $app->{rebuild_options} ||= {};
+        my @options;
+        my $opts = $app->registry("rebuild_options") || {};
+        if ($opts) {
+            foreach my $opt ( keys %$opts ) {
+                $opts->{$opt}{key} ||= $opt;
+                push @options, $opts->{$opt};
+            }
+        }
         $app->run_callbacks( 'rebuild_options', $app, \@options );
         for my $optn (@options) {
             if ( ( $optn->{key} || '' ) eq $type ) {
+                my $code = $optn->{code};
+                unless ( ref($code) eq 'CODE' ) {
+                    $code = MT->handler_to_coderef($code);
+                    $optn->{code} = $code;
+                }
                 $optn->{code}->();
                 $special = 1;
Index: trunk/lib/MT/CMS/Dashboard.pm
===================================================================
--- trunk/lib/MT/CMS/Dashboard.pm (revision 2812)
+++ trunk/lib/MT/CMS/Dashboard.pm (revision 3082)
@@ -404,24 +404,35 @@
 
     my $terms = {};
+    my $args = {};
     $terms->{blog_id} = $blog_id if $blog_id;
     $terms->{object_datasource} = 'entry';
-    my $args = {};
     $args->{group} = [ 'tag_id' ];
     $args->{sort} = '1'; # sort by count(*)
     $args->{direction} = 'descend';
     $args->{limit} = 100;
+    $args->{join} = MT::Tag->join_on(undef, { id => \'= objecttag_tag_id', is_private => 1 },
+        { not => { is_private => 1 } } );
 
     my $iter = $app->model('objecttag')->count_group_by($terms, $args);
     my @tag_loop;
+    my @tag_ids;
     my $ntags = 0;
     my $min = undef;
     my $max = undef;
     while (my ($count, $tag_id) = $iter->()) {
-        my $tag = MT::Tag->load($tag_id) or next;
-        next if $tag->is_private; # weed these from the dashboard
         $ntags += $count;
         $min = defined $min ? ($count < $min ? $count : $min) : $count;
         $max = defined $max ? ($count > $max ? $count : $max) : $count;
-        push @tag_loop, { name => $tag->name, count => $count };
+        push @tag_loop, { id => $tag_id, count => $count };
+        push @tag_ids, $tag_id;
+    }
+
+    if ( @tag_ids ) {
+        my $iter = MT::Tag->load_iter( { id => \@tag_ids } );
+        my %tags;
+        while ( my $t = $iter->() ) {
+            $tags{ $t->id } = $t->name;
+        }
+        $_->{name} = $tags{$_->{id}} for @tag_loop;
     }
 
Index: trunk/lib/MT/CMS/Common.pm
===================================================================
--- trunk/lib/MT/CMS/Common.pm (revision 3039)
+++ trunk/lib/MT/CMS/Common.pm (revision 3082)
@@ -961,8 +961,4 @@
         }
         elsif ( $type eq 'category' ) {
-            my @kids = MT::Category->load( { parent => $id } );
-            return $app->errtrans(
-"You can't delete that category because it has sub-categories. Move or delete the sub-categories first if you want to delete this one."
-            ) if @kids;
             if ( $app->config('DeleteFilesAtRebuild') ) {
                 require MT::Blog;
Index: trunk/lib/MT/CMS/Entry.pm
===================================================================
--- trunk/lib/MT/CMS/Entry.pm (revision 2994)
+++ trunk/lib/MT/CMS/Entry.pm (revision 3082)
@@ -676,5 +676,9 @@
     $param{list_filters}        = $app->list_filters('entry');
     $param{can_power_edit}      = $blog_id && !$is_power_edit;
-    $param{can_republish}       = $blog_id ? $perms->can_rebuild : 1;
+    $param{can_republish}       = $blog_id
+                                    ? $perms->can_rebuild
+                                    : $app->user->is_superuser
+                                        ? 1
+                                        : 0;
     $param{is_power_edit}       = $is_power_edit;
     $param{saved_deleted}       = $q->param('saved_deleted');
@@ -1058,5 +1062,5 @@
 
     my $class = $app->model($type)
-      or retrun $app->errtrans("Invalid parameter");
+      or return $app->errtrans("Invalid parameter");
 
     my $cat_class = $app->model( $class->container_type );
