Truncate overlong table entries.
[irspy-moved-to-github.git] / web / htdocs / raw.html
index 063f9b6..a198880 100644 (file)
@@ -1,24 +1,21 @@
-%# $Id: raw.html,v 1.3 2006-09-25 16:37:55 mike Exp $
+%# $Id: raw.html,v 1.9 2007-05-11 13:53:40 mike Exp $
 <%args>
 $id
 </%args>
 <%once>
 use ZOOM;
+use ZOOM::IRSpy::Utils qw(cql_target);
 </%once>
 <%perl>
-my $conn = new ZOOM::Connection("localhost:3313/IR-Explain---1");
-$conn->option(elementSetName => "zeerex");
-my $qid = $id;
-$qid =~ s/"/\\"/g;
-my $query = qq[rec.id="$qid"];
-my $rs = $conn->search(new ZOOM::Query::CQL($query));
+my $conn = new ZOOM::Connection("localhost:8018/IR-Explain---1");
+$conn->option(elementSetName => "zeerexNoAuth");
+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 $rec = $rs->record(0);
-    my $xml = $rec->render();
+    my $xml = $rs->record(0)->render();
     $r->content_type("text/xml");
     print $xml;
 }