X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=yarrg%2Fweb%2Fpirate-route;h=e414e6e87513cfda4f030fbd1f224bb273e6b349;hb=55c0517c2048155553c3e593125135ba83acd679;hp=a7d5eb25c2c210ba5c8d64f69929dfa23688bf80;hpb=f4739073c3f78b1c2646b58d6adbe983ab00ca15;p=ypp-sc-tools.web-live.git diff --git a/yarrg/web/pirate-route b/yarrg/web/pirate-route index a7d5eb2..e414e6e 100644 --- a/yarrg/web/pirate-route +++ b/yarrg/web/pirate-route @@ -7,7 +7,7 @@ my @vars; @vars= ({ Name => 'Ocean', Before => 'Ocean: ', CmpCanon => sub { ucfirst lc $_[0] }, - Values => [ qw(Midnight Ice) ] + Values => [ ocean_list() ] }, { Name => 'Dropdowns', Before => 'Interface: ', CmpCanon => sub { !!$_[0] }, @@ -55,7 +55,7 @@ foreach my $var (@vars) { $qf{$n}= $value; } } - my $uri= URI->new($self_url); + my $uri= URI->new($m->current_comp()->name()); $uri->query_form(%qf); print ''; $after= ''; @@ -66,7 +66,10 @@ foreach my $var (@vars) { print '
'; } -db_setocean($a{'ocean'}); +die "unknown ocean $a{Ocean} ?" + unless grep { $_ eq $a{Ocean} } ocean_list(); + +db_setocean($a{Ocean}); db_connect(); %perl> @@ -75,36 +78,128 @@ db_connect();
@@ -112,5 +207,6 @@ while ($row=$sth->fetchrow_arrayref) { <%init> use CommodsWeb; use HTML::Entities; +use URI::Escape; %init>