Code

contrib/collection3: Allow numbers in type names.
authorAnthony Dewhurst <dewhurst@gmail.com>
Sun, 30 Aug 2009 21:32:55 +0000 (22:32 +0100)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Mon, 31 Aug 2009 15:19:09 +0000 (17:19 +0200)
When converting the on-disk type name to the displayed name,
do not strip numbers out.

Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
contrib/collection3/bin/index.cgi

index ba5b48a0937b8c42bd2557142fbe33565ab156c8..85064b868f2354f4d5aff7f00bff1a5746be7d98 100755 (executable)
@@ -299,8 +299,8 @@ sub action_show_selection
     my $file = $_;
     my $type = ucfirst (lc ($file->{'type'}));
 
-    $type =~ s/[^A-Za-z_]//g;
-    $type =~ s/_([A-Za-z])/\U$1\E/g;
+    $type =~ s/[^A-Za-z0-9_]//g;
+    $type =~ s/_([A-Za-z0-9])/\U$1\E/g;
 
     if (!defined ($types->{$type}))
     {