[wellwell-devel] [wellwell] Fix delegate error in backend action map and ensure proper default.
Stefan Hornburg
wellwell-devel at rt.icdevgroup.org
Tue Sep 21 19:49:38 UTC 2010
commit 299cc878dde59ae841954035165f8e927a4b651e
Author: Stefan Hornburg (Racke) <racke at linuxia.de>
Date: Tue Sep 21 21:45:53 2010 +0200
Fix delegate error in backend action map and ensure proper default.
plugins/backend/code/backend.sub | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/plugins/backend/code/backend.sub b/plugins/backend/code/backend.sub
index 3a89eac..e9e0fb2 100644
--- a/plugins/backend/code/backend.sub
+++ b/plugins/backend/code/backend.sub
@@ -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/;
@@ -64,7 +69,7 @@ sub {
$CGI->{mv_nextpage} = 'backend/menus/list';
}
return 1;
- } else {
+ } elsif (@args) {
# delegate to a plugin?
my (@ret, @path);
@@ -85,6 +90,9 @@ sub {
return 1;
}
+ else {
+ $CGI->{mv_nextpage} = 'backend/products/list';
+ }
return 1;
}
More information about the wellwell-devel
mailing list