Author: dom Date: 2006-04-20 11:46:50 +0100 (Thu, 20 Apr 2006) New Revision: 772
Modified: trunk/Changes trunk/lib/OpenGuides/Template.pm Log: Fix empty category/locales (fixes #103)
Modified: trunk/Changes =================================================================== --- trunk/Changes 2006-04-20 10:26:48 UTC (rev 771) +++ trunk/Changes 2006-04-20 10:46:50 UTC (rev 772) @@ -9,6 +9,7 @@ Generate URIs for locales and contributors in RDF output. #107 Don't display partial http:// URL in preview. #93 Upgrade to new Google Maps API (for smaller javascript download) + #103 Fix empty Category/Locale list bug.
0.52 5 March 2006 IMPORTANT CHANGE: "supersearch.cgi" is now simply "search.cgi". If you
Modified: trunk/lib/OpenGuides/Template.pm =================================================================== --- trunk/lib/OpenGuides/Template.pm 2006-04-20 10:26:48 UTC (rev 771) +++ trunk/lib/OpenGuides/Template.pm 2006-04-20 10:46:50 UTC (rev 772) @@ -262,9 +262,9 @@ } else { my $categories_text = $q->param('categories'); my $locales_text = $q->param('locales'); - @catlist = sort map { s/^\s+//; s/\s+$//; $_; } # trim lead/trail space + @catlist = sort grep { s/^\s+//; s/\s+$//; $_; } # trim lead/trail space split("\r\n", $categories_text); - @loclist = sort map { s/^\s+//; s/\s+$//; $_; } # trim lead/trail space + @loclist = sort grep { s/^\s+//; s/\s+$//; $_; } # trim lead/trail space split("\r\n", $locales_text); }