[open-ils-commits] [GIT] Evergreen ILS branch master updated. 5d19146ef5a37337f5dea5725e9c137ab0d85728

Evergreen Git git at git.evergreen-ils.org
Fri Jul 19 15:20:44 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, master has been updated
       via  5d19146ef5a37337f5dea5725e9c137ab0d85728 (commit)
      from  ad8f28f45389593b04db3aeaa7ef0c82df159a59 (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 5d19146ef5a37337f5dea5725e9c137ab0d85728
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 5e5a2b2..3888226 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm
@@ -677,7 +677,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')) {
@@ -932,7 +932,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;
 
@@ -1057,9 +1057,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";
@@ -1071,10 +1071,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;
     }
 
@@ -1093,24 +1091,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";
 
@@ -1162,12 +1154,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') {
@@ -1192,8 +1182,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'
     );
 
@@ -1586,7 +1575,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