From c407f3171c63ee828581a91e706cf54ba641c80d 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 --- 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 566b614..c6ff6f7 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 45f7e0e..820b26d 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 fb8de72..c06413f 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 4f70e9b..8e2395a 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 3687451..d25205a 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 355d74a..60e34fb 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'}, -- 1.7.10.4