From: Mike Taylor Date: Fri, 11 May 2007 13:53:40 +0000 (+0000) Subject: Use cql_target() X-Git-Tag: CPAN-v1.02~54^2~350 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=35d4c1b15b01874ae6f70277869f94decda884de;p=irspy-moved-to-github.git Use cql_target() --- diff --git a/web/htdocs/raw.html b/web/htdocs/raw.html index 5b86379..a198880 100644 --- a/web/htdocs/raw.html +++ b/web/htdocs/raw.html @@ -1,21 +1,19 @@ -%# $Id: raw.html,v 1.8 2007-05-11 08:30:11 mike Exp $ +%# $Id: raw.html,v 1.9 2007-05-11 13:53:40 mike Exp $ <%args> $id <%once> use ZOOM; +use ZOOM::IRSpy::Utils qw(cql_target); <%perl> my $conn = new ZOOM::Connection("localhost:8018/IR-Explain---1"); $conn->option(elementSetName => "zeerexNoAuth"); -my $qid = $id; -$qid =~ s/"/\\"/g; -my $query = qq[rec.id="$qid"]; -my $rs = $conn->search(new ZOOM::Query::CQL($query)); +my $rs = $conn->search(new ZOOM::Query::CQL(cql_target($id))); my $n = $rs->size(); if ($n == 0) { $m->comp("/chrome/layout.mc", component => "/details/error.mc", - title => "Error", message => "No such ID '$id'"); + title => "Error", message => xml_encode("No such ID '$id'")); } else { my $xml = $rs->record(0)->render(); $r->content_type("text/xml");