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

Stefan Hornburg racke at rt.icdevgroup.org
Fri Mar 20 19:54:37 UTC 2009


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Interchange wellwell catalog".

The branch, master has been updated
       via  67e8c7783bf8bc454129d67154da991c66d1f962 (commit)
      from  0d5ffef1fc788700ab3a2b03b649575e7fb5f1fa (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 67e8c7783bf8bc454129d67154da991c66d1f962
Author: Stefan Hornburg (Racke) <racke at linuxia.de>
Date:   Fri Mar 20 20:54:22 2009 +0100

    filter option added

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

Summary of changes and diff:
 code/generate_uri.tag |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/code/generate_uri.tag b/code/generate_uri.tag
index 0991b85..90f20f9 100644
--- a/code/generate_uri.tag
+++ b/code/generate_uri.tag
@@ -45,6 +45,10 @@ Name of the field having the parent key. If it is not defined, generate_uri won'
 
 Name of the field where the URI will be stored to
 
+=item filter
+
+Filter name which is called to turn names into URIs. Overrides nonword_fill.
+
 =item nonword_fill
 
 What should be used to fill nonword characters in URI (whitespaces,...). Defaults to underscore.
@@ -139,9 +143,12 @@ sub {
 			my $row = $$rows[0];
 		
 			my $name = $row->{$display_field};
-			$name =~ s/\W+/$nonword_fill/g;
-			$name =~ tr/[A-Z]/[a-z]/;
-	
+			if ($opt->{filter}) {
+				$name = $Tag->filter($opt->{filter}, $name);
+			} else {
+				$name =~ s/\W+/$nonword_fill/g;
+				$name =~ tr/[A-Z]/[a-z]/;
+			}
 			unshift(@parents, $name);
 	
 			$sub->($level+1, $row->{$parent});


hooks/post-receive
-- 
Interchange wellwell catalog



More information about the wellwell-devel mailing list