[wellwell-devel] [wellwell] Skip adding current page to the URL for Wiki menu entries without action.

Stefan Hornburg wellwell-devel at rt.icdevgroup.org
Thu Sep 9 14:12:25 UTC 2010


commit c127e4bfc870c7b1950ede87ac12bb584ce79fe4
Author: Stefan Hornburg (Racke) <racke at linuxia.de>
Date:   Thu Sep 9 16:11:04 2010 +0200

    Skip adding current page to the URL for Wiki menu entries without action.

 lib/Vend/Wiki.pm |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/lib/Vend/Wiki.pm b/lib/Vend/Wiki.pm
index 5f8d611..3804cc5 100644
--- a/lib/Vend/Wiki.pm
+++ b/lib/Vend/Wiki.pm
@@ -430,15 +430,15 @@ sub menu {
 			}
 			
 			$label = $menu_ref->{label} || $_;
-				
-			if ($menu_ref->{action}) {
-				$form = {action => $menu_ref->{action}};
-			}
 
 			$url = $self->{url} || $self->{name};
+			
+			if ($menu_ref->{action}) {
+				$form = {action => $menu_ref->{action}};
 
-			if ($self->{page}) {
-				$url .= "/$self->{page}";
+				if ($self->{page}) {
+					$url .= "/$self->{page}";
+				}
 			}
 			
 			push(@entries, {name => $label, url => $url, form => $form,



More information about the wellwell-devel mailing list