[interchange] Transform ActionMaps to allow hyphens in the name, internally converted to underscores

David Christensen interchange-cvs at icdevgroup.org
Wed Feb 24 05:44:00 UTC 2010


commit a9224c0af3554f4b99b7237d36f1be501131e2ad
Author: David Christensen <david at endpoint.com>
Date:   Tue Feb 23 22:19:32 2010 -0600

    Transform ActionMaps to allow hyphens in the name, internally converted to underscores

 lib/Vend/Dispatch.pm |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/lib/Vend/Dispatch.pm b/lib/Vend/Dispatch.pm
index 8d37778..cf982a1 100644
--- a/lib/Vend/Dispatch.pm
+++ b/lib/Vend/Dispatch.pm
@@ -1786,6 +1786,7 @@ EOF
 	}
 	else {
 		($Vend::Action) = $Vend::FinalPath =~ m{\A([^/]*)};
+		$Vend::Action =~ s/-/_/g; # allow hyphens as synonyms for underscores for SEO prettiness
 	}
 
 #::logGlobal("action=$Vend::Action path=$Vend::FinalPath");



More information about the interchange-cvs mailing list