Bug 10325 - Allow system preferences to be overridable from koha-httpd.conf
authorKyle M Hall <kyle@bywatersolutions.com>
Fri, 24 May 2013 10:56:50 +0000 (06:56 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Sun, 8 Sep 2013 02:09:53 +0000 (02:09 +0000)
commit47bd795b828c7b99524145fe337ea0c6ac7d588f
tree7f3618baab8f3e78e95dc50e5a6dc75171e9b45d
parent402435b17a1ae32fb41b6fdde39b94059fdb2c2f
Bug 10325 - Allow system preferences to be overridable from koha-httpd.conf

For Koha installations with multiple OPAC URLs, It would be nice to be
able to override systeprefs from the http conf file. Case in point,
a library wants to have two separate opacs, one the is only viewable
from within the library that allows patrons to place holds, and a second
public one that does not. In this case, overriding the system preference
RequestOnOpac would accomplish this simply, and with no ill affects.

This feature would of course be should only be used to override
cosmetic effects on the system, and should not be used for system
preferences such as CircControl, but would be great for preferences
such as OpacStarRatings, opacuserjs, OpacHighlightedWords and many
others!

Test Plan:
1) Apply this patch
2) Disable the system pref OpacHighlightedWords
3) Do a seach in the OPAC, not the term is not highlighted
4) Edit your koha-http.conf file, add the line
     SetEnv OVERRIDE_SYSPREF_OpacHighlightedWords "1"
   to your koha-http.conf file's OPAC section.
   Also add the line
     SetEnv OVERRIDE_SYSPREF_NAMES "OpacHighlightedWords"
   to the Intranet section
5) Restart your web server, or just reload it's config
6) Do a seach, now your search term should be highlighted!
7) From the intranet preference editor, view the pref,
   You should see a warning the this preference has been overridden.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
C4/Context.pm
admin/preferences.pl
etc/koha-httpd.conf
koha-tmpl/intranet-tmpl/prog/en/css/preferences.css
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt