Bug 16041: Turn off StaffAuthorisedValueImages by default
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 30 Mar 2016 07:42:12 +0000 (08:42 +0100)
committerJulian Maurice <julian.maurice@biblibre.com>
Mon, 16 May 2016 07:30:32 +0000 (09:30 +0200)
commitfb24426f259812d1dde29f30285d9e91bbf5157b
treee16c3a8886750308e9dfcea05a11daa00e11e6b9
parent9e9b07b88e1fcddbf3afe7226fa005e3945b8ebe
Bug 16041: Turn off StaffAuthorisedValueImages by default

This feature is enabled by default, but the users are not aware of it
and it costs a lot of time processing to get the images.

There are 2 prefs to drive this feature: StaffAuthorisedValueImages and
AuthorisedValueImages. AuthorisedValueImages is not added by sysprefs.sql and
does not appear in updatedatabase.pl, we could easily imagine that
nobody uses it.
With XSLT enabled, the feature is only visible on a record detail page
at the OPAC, if AuthorisedValueImages is set.
Otherwise you need to turn the XSLT off. In this case you will see the
images on the result list (OPAC+Staff interfaces) and OPAC detail page,
but not the Staff detail page.

The idea of this patch is to introduce a quick switch if the feature is
not used by the library.

Test plan:
1/ Turn the pref on and set authorised_values.imageurl to NULL
Execute the DB entry
=> The pref have been turned off
2/ Turn the pref on and set an image for an authorised value
Execute the DB entry
You will get a warning
3/ Turn the pref off and set an image for an authorised value
Execute the DB entry
You will get a warning
4/ Turn the pref off and set authorised_values.imageurl to NULL
Execute the DB entry
You won't get a warning

Note that the opac detail page now checks the pref before retrieving the
images.

Followed test plan, works as expected.
Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Fixed update message 'that means'.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 78605bceb368ed298e7d47fbb64b255dfcdd2842)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
installer/data/mysql/atomicupdate/bug_16041.perl [new file with mode: 0644]
installer/data/mysql/sysprefs.sql
opac/opac-detail.pl