[Koha-bugs] [Bug 11575] OPACBaseURL sometimes set by ENV variable and not system preference

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jan 20 02:05:22 CET 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11575

--- Comment #1 from David Cook <dcook at prosentient.com.au> ---
Created attachment 24556
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24556&action=edit
Bug 11575 - OPACBaseURL sometimes set by ENV variable and not system preference

This patch changes how the OPACBaseURL parameter gets set in the subroutine
get_template_and_user in Auth.pm.

Currently, it's being set by the $ENV{'SERVER_NAME'} variable, which is
typically filled by the URL that the user uses to access a page. While this
works in many cases, this causes a problem when using a proxy server. The
SERVER_NAME will instead be the domain of the proxy server (for more
info, read the comments already on this bug on Bugzilla). There are
ways to compensate for proxy servers. However, such a solution seems
a bit convoluted...

Elsewhere in Koha, we use the system preference OPACBaseURL, so I think
it makes sense to use it here as well.

I did leave the $ENV{'SERVER_NAME'} as a full back if OPACBaseURL isn't
set, but that's it.

_TEST PLAN_

Before applying:

1) Clear your OPACBaseURL preference
2) Perform a search in the OPAC
3) Click on or hover over the orange RSS icon
4) Note that the URL you used to access the site is the URL used
for the RSS link
5) Add an OPACBaseURL that isn't the same as the actual OPAC URL
6) Note that the OPACBaseURL system preference has no effect here

After applying the patch:

7) Refresh the page
8) Note that the URL you see now is actually the OPACBaseURL system
preference that you set
9) Clear your OPACBaseURL system preference
10) Refresh your search page
11) Note that the URL has reverted back to the URL that you used
to access the page

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list