X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=yarrg%2Fweb%2Fquery_route;h=8b491d93a99aca47c41b8a77306648c10975acf1;hb=5d41f4f9fd6a3f188bba831a1a8902f7890cef8f;hp=ea483578d565d6df529dffcfddf7d1c6a5c1e9cf;hpb=6335baf49c849e16ae7845016d97bcb76d4b7cf6;p=ypp-sc-tools.web-live.git diff --git a/yarrg/web/query_route b/yarrg/web/query_route index ea48357..8b491d9 100644 --- a/yarrg/web/query_route +++ b/yarrg/web/query_route @@ -40,6 +40,7 @@ $prselector $routestring => ''; $capacitystring => ''; $lossperleague => ''; +$capitalstring => ''; $someresults $emsgokorprint %args> @@ -51,6 +52,7 @@ my @islandids; my %islandid2; my ($max_volume, $max_mass); my $lossperleaguepct; +my $capital; my $qa= \%ARGS; @@ -79,10 +81,12 @@ Enter route (islands, or archipelagoes, separated by |s or commas; <&| qtextstring, qa => $qa, dbh => $dbh, thingstring => 'routestring', emsgstore => \$emsg, - perresult => sub { - my ($canonname, $island, $arch) = @_; - push @islandids, $island; - push @archipelagoes, defined $island ? undef : $arch; + onresults => sub { + foreach (@_) { + my ($canonname, $island, $arch) = @$_; + push @islandids, $island; + push @archipelagoes, defined $island ? undef : $arch; + } } &> size=80 @@ -97,11 +101,10 @@ Enter route (islands, or archipelagoes, separated by |s or commas; Vessel or capacity: <&| qtextstring, qa => $qa, dbh => $dbh, prefix => 'cs', thingstring => 'capacitystring', emsgstore => \$emsg, - perresult => sub { - ($max_volume,$max_mass) = @_; - } + helpref => 'capacity', + onresults => sub { ($max_mass,$max_volume) = @_; } &> - size=30 + size=40 &>