use path-based bib IDs instead of GET params
authorBill Erickson <berick@esilibrary.com>
Fri, 21 Jan 2011 21:09:07 +0000 (16:09 -0500)
committerBill Erickson <berick@esilibrary.com>
Fri, 21 Jan 2011 21:09:07 +0000 (16:09 -0500)
Open-ILS/src/perlmods/OpenILS/WWW/EGCatLoader.pm
Open-ILS/web/templates/default/opac/results.tt2

index 98eff62..754616c 100644 (file)
@@ -3,7 +3,7 @@ use strict; use warnings;
 use CGI;
 use XML::LibXML;
 use Digest::MD5 qw(md5_hex);
-use Apache2::Const -compile => qw(OK DECLINED HTTP_INTERNAL_SERVER_ERROR REDIRECT);
+use Apache2::Const -compile => qw(OK DECLINED HTTP_INTERNAL_SERVER_ERROR REDIRECT HTTP_BAD_REQUEST);
 use OpenSRF::AppSession;
 use OpenSRF::EX qw/:try/;
 use OpenSRF::Utils::Logger qw/$logger/;
@@ -317,8 +317,11 @@ sub load_rresults {
 sub load_rdetail {
     my $self = shift;
 
+    my $rec_id = $self->ctx->{page_args}->[0]
+        or return Apache2::Const::HTTP_BAD_REQUEST;
+
     $self->ctx->{record} = $self->editor->retrieve_biblio_record_entry([
-        $self->cgi->param('record'),
+        $rec_id,
         {
             flesh => 2, 
             flesh_fields => {
index a0e13a8..956e4ea 100644 (file)
@@ -87,7 +87,7 @@
                     </td>
                     <td width='auto'>
                         <div>
-                            <a href='rdetail?record=[% rec.bre.id %]'>[% attrs.title %]</a>
+                            <a href='rdetail/[% rec.bre.id %]'>[% attrs.title %]</a>
                             <span style='padding-left:10px;'>[% rec.copy_counts.available %] / [% rec.copy_counts.visible %]</span>
                         </div>
                         <div>[% attrs.author %]</div>