[open-ils-commits] [GIT] Evergreen ILS branch rel_2_4 updated. 6bcf6cc21b9fa5f7282ebedee71c5f2da7f668d9

Evergreen Git git at git.evergreen-ils.org
Fri Jul 19 15:30:38 EDT 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_2_4 has been updated
       via  6bcf6cc21b9fa5f7282ebedee71c5f2da7f668d9 (commit)
      from  8e091722fe683e354a74510ac62ca7af92568e4d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 6bcf6cc21b9fa5f7282ebedee71c5f2da7f668d9
Author: Mike Rylander <mrylander at gmail.com>
Date:   Thu Jul 18 14:48:36 2013 -0400

    Point feeds to TPAC instead of slimpac or JSPAC
    
    Where possible, point to TPAC endpoints for HMTL output of supercat feeds.
    
    Also, just use the bookbag (container) name for bookbag feeds, instead of
    wrapping them in formatting and context.  The description element already
    provides that.
    
    Signed-off-by: Mike Rylander <mrylander at gmail.com>
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm
index 16fdb24..4480586 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm
@@ -637,7 +637,7 @@ sub unapi {
     if ($format eq 'opac') {
         print "Location: $root/../../$locale/skin/$skin/xml/rresult.xml?m=$id&l=$lib_id&d=$lib_depth\n\n"
             if ($type eq 'metarecord');
-        print "Location: $root/../../$locale/skin/$skin/xml/rdetail.xml?r=$id&l=$lib_id&d=$lib_depth\n\n"
+        print "Location: /eg/opac/record/$id?locg=$lib_id&depth=$lib_depth\n\n"
             if ($type eq 'record');
         return 302;
     } elsif (OpenILS::WWW::SuperCat::Feed->exists($base_format) && ($type ne 'acn' && $type ne 'acp' && $type ne 'auri')) {
@@ -889,7 +889,7 @@ sub supercat {
     if ($format eq 'opac') {
         print "Location: $root/../../$locale/skin/$skin/xml/rresult.xml?m=$id\n\n"
             if ($type eq 'metarecord');
-        print "Location: $root/../../$locale/skin/$skin/xml/rdetail.xml?r=$id\n\n"
+        print "Location: /eg/opac/record/$id\n\n"
             if ($type eq 'record');
         return 302;
 
@@ -1009,9 +1009,9 @@ sub bookbag_feed {
     my $org_unit = get_ou($org);
     my $scope = "l=" . $org_unit->[0]->id . "&";
 
-    $root =~ s{(?<!http:)//}{/}go;
-    $base =~ s{(?<!http:)//}{/}go;
-    $unapi =~ s{(?<!http:)//}{/}go;
+    $root =~ s{(?<!http:)//}{//}go;
+    $base =~ s{(?<!http:)//}{//}go;
+    $unapi =~ s{(?<!http:)//}{//}go;
 
     my $path = $cgi->path_info;
     #warn "URL breakdown: $url -> $root -> $base -> $path -> $unapi";
@@ -1023,10 +1023,8 @@ sub bookbag_feed {
     return Apache2::Const::NOT_FOUND unless($bucket);
 
     my $bucket_tag = "tag:$host,$year:record_bucket/$id";
-    if ($type eq 'opac') {
-        print "Location: $root/../../$locale/skin/$skin/xml/rresult.xml?$scope" . "rt=list&" .
-            join('&', map { "rl=" . $_->target_biblio_record_entry } @{ $bucket->items }) .
-            "\n\n";
+    if (lc($type) eq 'opac') {
+        print "Location: /eg/opac/results?bookbag=$id\n\n";
         return 302;
     }
 
@@ -1045,24 +1043,18 @@ sub bookbag_feed {
     $feed->root($root);
     $feed->id($bucket_tag);
 
-    $feed->title("Items in Book Bag [".$bucket->name."]");
+    $feed->title($bucket->name);
     $feed->description($bucket->description || ("Items in Book Bag [".$bucket->name."]"));
     $feed->creator($host);
     $feed->update_ts();
 
     $feed->link(alternate => $base . "/rss2-full/$id" => 'application/rss+xml');
     $feed->link(atom => $base . "/atom-full/$id" => 'application/atom+xml');
+    $feed->link(opac => $base . "/opac/$id" => 'text/html');
+    $feed->link(OPAC => $base . "/opac/$id" => 'text/html');
     $feed->link(html => $base . "/html-full/$id" => 'text/html');
     $feed->link(unapi => $unapi);
 
-    $feed->link(
-        OPAC =>
-        "http://$host/opac/$locale/skin/$skin/xml/rresult.xml?$scope" . "rt=list&" .
-            join('&', map { 'rl=' . $_->target_biblio_record_entry } @{$bucket->items} ),
-        'text/html'
-    );
-
-
     print "Content-type: ". $feed->type ."; charset=utf-8\n\n";
     print $feed->toString . "\n";
 
@@ -1114,12 +1106,10 @@ sub changes_feed {
 
     my $list = $supercat->request("open-ils.supercat.$rtype.record.$axis.recent", $date, $limit)->gather(1);
 
-    #if ($type eq 'opac') {
-    #    print "Location: $root/../../en-US/skin/default/xml/rresult.xml?rt=list&" .
-    #        join('&', map { "rl=" . $_ } @$list) .
-    #        "\n\n";
-    #    return 302;
-    #}
+    if (lc($type) eq 'opac') {
+        print "Location: /eg/opac/results?query=record_list(".join(',', @$list ).")+sort(edit_date)+\%23descending&locg=".$org_unit->[0]->id . "\n\n";
+        return 302;
+    }
 
     my $search = 'record';
     if ($rtype eq 'authority') {
@@ -1144,8 +1134,7 @@ sub changes_feed {
 
     $feed->link(
         OPAC =>
-        "http://$host/opac/$locale/skin/$skin/xml/rresult.xml?$scope" . "rt=list&" .
-            join('&', map { 'rl=' . $_} @$list ),
+        "http://$host/eg/opac/results?query=record_list(".join(',', @$list ).")\%20sort(edit_date)#descending&locg=".$org_unit->[0]->id,
         'text/html'
     );
 
@@ -1532,7 +1521,8 @@ sub create_record_feed {
 
         $node->id($item_tag);
         #$node->update_ts(cleanse_ISO8601($record->edit_date));
-        $node->link(alternate => $feed->unapi . "?id=$item_tag&format=htmlholdings-full" => 'text/html') if ($flesh > 0);
+        $node->link(alternate => $feed->unapi . "?id=$item_tag&format=opac" => 'text/html') if ($flesh > 0);
+        $node->link(slimpac => $feed->unapi . "?id=$item_tag&format=htmlholdings-full" => 'text/html') if ($flesh > 0);
         $node->link(opac => $feed->unapi . "?id=$item_tag&format=opac") if ($flesh > 0);
         $node->link(unapi => $feed->unapi . "?id=$item_tag") if ($flesh);
         $node->link('unapi-id' => $item_tag) if ($flesh);

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm |   44 ++++++++-------------
 1 files changed, 17 insertions(+), 27 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list