Skip to content

Commit

Permalink
Die if no blog specified, fixed a variable name, and bumped to versio…
Browse files Browse the repository at this point in the history
…n 2.1.1.
  • Loading branch information
danwolfgang committed Jun 1, 2016
1 parent 45f9aea commit 5a25d75
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins/CleanSweep/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ author_link: http://www.majordojo.com/
plugin_link: https://github.com/endevver/mt-plugin-cleansweep
schema_version: 5
static_version: 2
version: 2.1.0
version: 2.1.1

object_types:
cleansweep_log: CleanSweep::Log
Expand Down
3 changes: 2 additions & 1 deletion plugins/CleanSweep/lib/CleanSweep/CMS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ sub report {
if $app->can('blog');
$blog = $app->model('blog')->load( $q->param('blog_id') )
if !$blog && $q->param('blog_id');
die $app->error('Blog ID not specified!') if !$blog;

my $plugin = $app->component('CleanSweep');
my $config = $plugin->get_config_hash('blog:'.$blog->id);
Expand Down Expand Up @@ -210,7 +211,7 @@ sub _guess_intended {
while ( my $child_blog = $iter->() ) {
push @child_blog_ids, $child_blog->id;
}
if ( @blog_ids ) {
if ( @child_blog_ids ) {
$entry = $app->model('entry')->load({
basename => $basename,
blog_id => \@child_blog_ids,
Expand Down

0 comments on commit 5a25d75

Please sign in to comment.