Skip to content

Commit

Permalink
Fix delegate error in backend action map and ensure proper default.
Browse files Browse the repository at this point in the history
  • Loading branch information
racke committed Sep 21, 2010
1 parent 3625e1c commit 299cc87
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions plugins/backend/code/backend.sub
Expand Up @@ -10,7 +10,12 @@ sub {
return 1;
}

if ($args[0] eq 'categories') {
if ($args[0] eq 'products') {
$args[1] ||= 'list';
$CGI->{mv_nextpage} = "$name/products/$args[1]";
return 1;
}
elsif ($args[0] eq 'categories') {
$Tag->perl({tables => 'categories'});
@fields = qw/name/;

Expand Down Expand Up @@ -64,7 +69,7 @@ sub {
$CGI->{mv_nextpage} = 'backend/menus/list';
}
return 1;
} else {
} elsif (@args) {
# delegate to a plugin?
my (@ret, @path);

Expand All @@ -85,6 +90,9 @@ sub {

return 1;
}
else {
$CGI->{mv_nextpage} = 'backend/products/list';
}

return 1;
}
Expand Down

0 comments on commit 299cc87

Please sign in to comment.