The template opac-opensearch.tt is ready to use
OPACBaseURL, but it doesn't get the value.
This patch corrects this in opac-search.pl.
---
 opac/opac-search.pl |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/opac/opac-search.pl b/opac/opac-search.pl
index 42eb0ec..cd7d6d5 100755
--- a/opac/opac-search.pl
+++ b/opac/opac-search.pl
@@ -714,11 +714,19 @@ my $session = get_session($cgi->cookie("CGISESSID"));
 my @addpubshelves;
 my $pubshelves = $session->param('pubshelves');
 my $barshelves = $session->param('barshelves');
+my $OPACRssURL;
 foreach my $shelf (@$pubshelves) {
        next if ( ($shelf->{'owner'} != ($borrowernumber ? $borrowernumber : 
-1)) && ($shelf->{'category'} < 3) );
        push (@addpubshelves, $shelf);
 }
 
+if ( C4::Context->preference('OPACBaseURL') ne '' ) {
+       $OPACRssURL = C4::Context->preference('OPACBaseURL');
+       $OPACRssURL=~s/https:/http:/;
+    if ( $OPACRssURL !~ m/^http:\/\// ) { $OPACRssURL = "http://"; . 
$OPACRssURL }
+       $template->param( OPACBaseURL     => $OPACRssURL );
+}
+
 if (@addpubshelves) {
        $template->param( addpubshelves     => scalar (@addpubshelves));
        $template->param( addpubshelvesloop => \@addpubshelves);
-- 
1.7.4.1

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to