X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.web-live.git;a=blobdiff_plain;f=yarrg%2Fweb%2Froute;h=9c7200c39480df0343ab70b7615e4e994316b3d2;hp=74a5086f1428b64f37e269dd66f3eff07ed999d7;hb=c363ec70c47a05f429b3bda15f4a4e42d5233eb2;hpb=44ad4cede24bbf34e0404feb993118496d7e3fb5 diff --git a/yarrg/web/route b/yarrg/web/route index 74a5086..9c7200c 100644 --- a/yarrg/web/route +++ b/yarrg/web/route @@ -87,11 +87,7 @@ foreach my $var (@vars) { #---------- initial checks, startup, main entry form ---------- -die "unknown ocean $a{Ocean} ?" - unless grep { $_ eq $a{Ocean} } ocean_list(); - -db_setocean($a{Ocean}); -db_connect(); +dbw_connect($a{Ocean}); <%args> @@ -176,6 +172,8 @@ my $optionlistmap= sub { return $out; }; +my $dbh= dbw_connect($a{Ocean}); + $sth= $dbh->prepare("SELECT DISTINCT archipelago FROM islands ORDER BY archipelago;"); $sth->execute(); @@ -342,5 +340,6 @@ function debug (m) { use CommodsWeb; use HTML::Entities; use URI::Escape; +use JSON;