Bug 6146 - In Auth.pm the var OPACBaseURL ignores the syspref OPACBaseURL
Summary: In Auth.pm the var OPACBaseURL ignores the syspref OPACBaseURL
Status: RESOLVED DUPLICATE of bug 5010
Alias: None
Product: Koha
Classification: Unclassified
Component: Authentication (show other bugs)
Version: 3.4
Hardware: All All
: PATCH-Sent (DO NOT USE) normal (vote)
Assignee: Juan Romay Sieira
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-08 12:55 UTC by Juan Romay Sieira
Modified: 2015-10-19 22:55 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
proposed patch (1.55 KB, patch)
2011-04-08 12:55 UTC, Juan Romay Sieira
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Juan Romay Sieira 2011-04-08 12:55:38 UTC
Created attachment 3839 [details] [review]
proposed patch

In Auth.pm the var OPACBaseURL ignores the syspref OPACBaseURL.
If this syspref is set, its value must be included in this param.

A patch was submitted
Comment 1 Frédéric Demians 2011-05-13 09:45:09 UTC
Isn't OPACBaseURL about to be debrecated? The current code build the
OPAC URL based on the http server environment variables. It's better. It
means that if you change your domain name, it will be automatically
reported, you won't have to change a Koha syspref.
Comment 2 Katrin Fischer 2011-05-13 09:53:16 UTC
Hi Frederic, 

I think OpacBaseUrl is used in other places too. Like the links to opac from detail pages in intranet. And I think it's used in some mails too (mail your cart?). Don't know enough to say if it should be deprecated - but if we should take a look at those places too.

Katrin
Comment 3 Frédéric Demians 2011-05-13 10:06:09 UTC
(In reply to comment #2)

> I think OpacBaseUrl is used in other places too. Like the links to opac from
> detail pages in intranet. And I think it's used in some mails too (mail your
> cart?). Don't know enough to say if it should be deprecated - but if we should
> take a look at those places too.

A quick look shows that OPACBaseURL is set in catalogue/detail.pl but
not used anywhere in OPAC, and not in mail your cart template.

But it seems that it has been added recently into MARC21 XSL in order to
offer a link to OPAC from staff interface. I'm not sure it's a good
idea, even if I can't see other mean to do it.
Comment 4 Owen Leonard 2011-10-07 14:11:25 UTC
OPACBaseURL is used in several places now, including the link to the OPAC from the detail page. It is used in the patch pending for Bug 6957. However, the way I've seen it used is to call the preference directly. In detail.pl:

# Get OPAC URL
if (C4::Context->preference('OPACBaseURL')){
     $template->param( OpacUrl => C4::Context->preference('OPACBaseURL') );
}

And build the link assuming that OPACBaseURL contains just the domain. In detail.tt:

<a href="http://[% OPACBaseURL %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber %]" target="_blank">Open in new window</a>

Before or after this patch, if I leave the OPACBaseURL system preference empty, the output of the OPACBaseURL variable generated by Auth.pm is empty as well. I suspect something is wrong in the way the code builds the URL with or without this patch.
Comment 5 Mark Tompsett 2014-11-20 05:28:35 UTC
I think that bug 5010 will address this. Thoughts?
Comment 6 Mark Tompsett 2015-10-19 22:55:42 UTC
It's been a year without comment, and I believe that bug 5010 which has been integrated to master dealt with this. I am marking this resolved duplicate instead of Failed QA.

*** This bug has been marked as a duplicate of bug 5010 ***