From: Ian Jackson Date: Sun, 16 Aug 2009 02:13:58 +0000 (+0100) Subject: Fix new textstring indirection X-Git-Tag: 3.4~179 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.web-live.git;a=commitdiff_plain;h=dfae6286760f90eec22d236d57014f68149161ad;hp=b124f869e5f0d90bf1caa178c92f6ebc267cfa8c Fix new textstring indirection --- diff --git a/yarrg/web/qtextstringcheck b/yarrg/web/qtextstringcheck index 4196018..4018455 100644 --- a/yarrg/web/qtextstringcheck +++ b/yarrg/web/qtextstringcheck @@ -59,12 +59,6 @@ if ($format =~ /json/) { }; print to_json_shim($jobj); } -if ($format =~ /return/) { - return { - Error => $emsg, - Results => length $emsg ? $results : undef - }; -} if ($format =~ /dump/) { $r->content_type('text/plain'); print Dumper($emsg, $canontext, $results); diff --git a/yarrg/web/query_route b/yarrg/web/query_route index b91e55c..dc1ebc9 100644 --- a/yarrg/web/query_route +++ b/yarrg/web/query_route @@ -168,15 +168,15 @@ $results_head= sub { if (!$qa->{Dropdowns}) { if (length $routestring) { $results_head->(); - my $rsr= $m->comp('routetextstring', + my ($emsg,$canonstring,$results)= $m->comp('check_routestring', ocean => $qa->{Ocean}, string => $routestring, format => 'return' ); - if (length $rsr->{Error}) { - print encode_entities($rsr->{Error}); + if (length $emsg) { + print encode_entities($emsg); } else { - foreach my $entry (@{ $rsr->{Results} }) { + foreach my $entry (@$results) { push @archipelagoes, defined $entry->[1] ? undef : $entry->[0]; push @islandids, $entry->[1];