]> git.koha-community.org Git - koha.git/commit
Bug 10595: don't display OpacTopissue page when system preference is turned off
authorMirko Tietgen <mirko@abunchofthings.net>
Tue, 16 Jul 2013 19:51:01 +0000 (21:51 +0200)
committerChris Hall <followingthepath@gmail.com>
Sun, 15 Sep 2013 05:20:50 +0000 (17:20 +1200)
commit750950c17a243dbec1001ef8b6a17f2a13f45bcb
tree534b3d4c0a6cbc3f206351afe3313c7267ddf6cb
parent6f00d1e383c8eefcaab87a89250c7a93ce6877c0
Bug 10595: don't display OpacTopissue page when system preference is turned off

When the syspref is turned off, the link is hidden but the page is still
accessible. This patch checks the syspref and redirects to 404 if it is disabled.

Test plan:

Before applying the patch

Enable OpacTopissue
  Observe there is a link to opac-topissues.pl next to Advanced search etc.
  Follow that link, observe that opac-topissues.pl is loading
Disable OpacTopissue
  Observe the link is gone
  Manually open /koha/opac-topissues.pl and check that it is loading even though the feature is disabled

Apply patch

(OpacTopissue still diabled)
Manually open /koha/opac-topissues.pl and observe that you are being redirected to the 404 page.
Enable OpacTopissue
  Follow the link or manuall open opac-topissues.pl and check that it is working

Signoff the patch.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 04ca81bc358f1bc6425e1cef431d9e4abfc744d8)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as expected
(cherry picked from commit 094bfd0d17689c92a4e9366af63ffb7fcbe99399)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 094bfd0d17689c92a4e9366af63ffb7fcbe99399)
Signed-off-by: Chris Hall <followingthepath@gmail.com>
(cherry picked from commit d92e6c746de1060a34631f4a0eea7bc71b110cd8)
opac/opac-topissues.pl