[wellwell-devel] [SCM] Interchange wellwell catalog branch, master, updated. ef1484ef1a0ac0afd7937ce28c4eb66ee34f0455

Stefan Hornburg racke at rt.icdevgroup.org
Thu Feb 11 16:23:26 UTC 2010


       via  ef1484ef1a0ac0afd7937ce28c4eb66ee34f0455 (commit)
      from  5338693fd44a3ea31f7e56a97bc09d7ecbdb96e4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ef1484ef1a0ac0afd7937ce28c4eb66ee34f0455
Author: Stefan Hornburg (Racke) <racke at linuxia.de>
Date:   Thu Feb 11 17:22:13 2010 +0100

    improved matching of URL and wiki name

-----------------------------------------------------------------------

Summary of changes and diff:
 lib/Vend/Wiki.pm |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/lib/Vend/Wiki.pm b/lib/Vend/Wiki.pm
index 5a42069..abf2fc0 100644
--- a/lib/Vend/Wiki.pm
+++ b/lib/Vend/Wiki.pm
@@ -425,11 +425,21 @@ sub action {
 	
  	($action, $url) = split(m{/+}, $path, 2);
 
-	# examine configuration for wiki name and relay to configured page
-	while (($key, $value) = each %{$Vend::Cfg->{Wiki}}) {
-		if ($action eq $value->{url}) {
-			$name = $key;
-			$page = $value->{page};
+	if (keys %{$Vend::Cfg->{Wiki}} == 1) {
+		$name = (keys %{$Vend::Cfg->{Wiki}})[0];
+	}
+	else {
+		# examine configuration for wiki name and relay to configured page
+		while (($key, $value) = each %{$Vend::Cfg->{Wiki}}) {
+			if ($action eq $value->{url}) {
+				$name = $key;
+				$page = $value->{page};
+				last;
+			}
+			elsif ($action eq $key) {
+				$name = $key;
+				last;
+			}
 		}
 	}
 


hooks/post-receive
-- 
Interchange wellwell catalog



More information about the wellwell-devel mailing list