From 607b224f0094bd146f93c99bb135c6d00da225e6 Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Tue, 10 Mar 2015 12:15:28 +0000 Subject: [PATCH] Bug 13591: Pass OPACBaseURL to rss creation process Links in rss templates were hardcoded to library.org.nz. Should pass and use the system's OPACBaseURL. Tested and verified. Signed-off-by: Eivin Giske Skaaren Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- misc/cronjobs/rss/lastAcquired-1.0.tt | 8 ++++---- misc/cronjobs/rss/lastAcquired-2.0.tt | 4 ++-- misc/cronjobs/rss/lastAcquired.tt | 2 +- misc/cronjobs/rss/longestUnseen.tt | 2 +- misc/cronjobs/rss/mostReserved.tt | 2 +- misc/cronjobs/rss/rss.pl | 1 + 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/misc/cronjobs/rss/lastAcquired-1.0.tt b/misc/cronjobs/rss/lastAcquired-1.0.tt index 566b614a58..c6ff6f76dd 100644 --- a/misc/cronjobs/rss/lastAcquired-1.0.tt +++ b/misc/cronjobs/rss/lastAcquired-1.0.tt @@ -18,21 +18,21 @@ [% FOREACH i IN ITEMS %] - + [% END %] [% FOREACH i IN ITEMS %] - + [% i.TITLE %][% IF i.AUTHOR %] by [% i.AUTHOR %][% END %] - http://opac.library.org.nz/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber %] + [% OPACBaseURL %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber %] [% place %] [% i.publishercode %] [% i.publicationyear %]
[% pages %] [% i.illus %] [% i.size %] [% IF i.notes %]

[% i.notes %][% END %]
-View Details | Reserve this Item[% IF i.author %] | More by this Author[% END %] +View Details | Reserve this Item[% IF i.author %] | More by this Author[% END %] ]]>
[% END %] diff --git a/misc/cronjobs/rss/lastAcquired-2.0.tt b/misc/cronjobs/rss/lastAcquired-2.0.tt index 45f7e0ea55..820b26d827 100644 --- a/misc/cronjobs/rss/lastAcquired-2.0.tt +++ b/misc/cronjobs/rss/lastAcquired-2.0.tt @@ -20,12 +20,12 @@ [% FOREACH i IN ITEMS %] [% i.TITLE %][% IF i.AUTHOR %] by [% i.AUTHOR %][% END %] - http://opac.library.org.nz/cgi-bin/koha/opac-detail.pl?biblionumber=[% i.biblionumber %] + [% OPACBaseURL %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% i.biblionumber %] [% IF i.publishercode %][% i.place %] [% i.publishercode %] [% publicationyear %]
[% END %] [% IF i.pages %][% i.pages %][% i.illus %][% i.size %][% END %] [% IF i.notes %]

[% i.notes %]

[% END %]
-View Details | Reserve this Item[% IF i.author %] | More by this Author[% END %] +View Details | Reserve this Item[% IF i.author %] | More by this Author[% END %] ]]>
[% END %] diff --git a/misc/cronjobs/rss/lastAcquired.tt b/misc/cronjobs/rss/lastAcquired.tt index fb8de72032..c06413f2bb 100644 --- a/misc/cronjobs/rss/lastAcquired.tt +++ b/misc/cronjobs/rss/lastAcquired.tt @@ -21,7 +21,7 @@ [% FOREACH i IN ITEMS %] [% i.TITLE %], by [% i.AUTHOR %] - http://opac.library.org.nz/cgi-bin/koha/opac-detail.pl?biblionumber=[% i.biblionumber %] + [% OPACBaseURL %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% i.biblionumber %] [% END %] diff --git a/misc/cronjobs/rss/longestUnseen.tt b/misc/cronjobs/rss/longestUnseen.tt index 4f70e9b1bf..8e2395a610 100644 --- a/misc/cronjobs/rss/longestUnseen.tt +++ b/misc/cronjobs/rss/longestUnseen.tt @@ -21,7 +21,7 @@ [% FOREACH i IN ITEMS %] [% i.TITLE %], by [% i.AUTHOR %] - http://opac.library.org.nz/cgi-bin/koha/opac-searchresults.pl?isbn=[% i.ISBN %] + [% OPACBaseURL %]/cgi-bin/koha/opac-searchresults.pl?isbn=[% i.ISBN %] [% END %] diff --git a/misc/cronjobs/rss/mostReserved.tt b/misc/cronjobs/rss/mostReserved.tt index 3687451648..d25205aa52 100644 --- a/misc/cronjobs/rss/mostReserved.tt +++ b/misc/cronjobs/rss/mostReserved.tt @@ -21,7 +21,7 @@ [% FOREACH i IN ITEMS %] [% TITLE %], by [% AUTHOR %] - http://opac.library.org.nz/cgi-bin/koha/opac-searchresults.pl?isbn=[% ISBN %] + [% OPACBaseURL %]/cgi-bin/koha/opac-searchresults.pl?isbn=[% ISBN %] [% END %] diff --git a/misc/cronjobs/rss/rss.pl b/misc/cronjobs/rss/rss.pl index 355d74ab99..60e34fb04d 100755 --- a/misc/cronjobs/rss/rss.pl +++ b/misc/cronjobs/rss/rss.pl @@ -41,6 +41,7 @@ my $feed = Template->new(); my %channel = getConf("channel"); my %image = getConf("image"); my $vars = { + OPACBaseURL => C4::Context->preference('OPACBaseURL'), CHANNELTITLE => $channel{'title'}, CHANNELLINK => $channel{'link'}, CHANNELDESC => $channel{'desc'}, -- 2.39.5