Bug 10595

Summary: OpacTopissue page still accessible when system preference is turned off
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Jonathan Druart <jonathan.druart>
Severity: normal    
Priority: P5 - low CC: bgkriegel, chrish, gmcharlt, jonathan.druart, mirko, tomascohen
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 10595 - OpacTopissue page still accessible when system preference is turned off
[SIGNED-OFF] Bug 10595 - OpacTopissue page still accessible when system preference is turned off
Bug 10595 - OpacTopissue page still accessible when system preference is turned off

Description Katrin Fischer 2013-07-16 10:32:45 UTC
The page for most popular titles should not be accessible when the feature is turned off in the system preferences (OpacTopissues).
Comment 1 Mirko Tietgen 2013-07-16 19:59:08 UTC Comment hidden (obsolete)
Comment 2 Srdjan Jankovic 2013-07-17 01:31:10 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2013-07-18 11:52:18 UTC
QA comment:
Simple patch, works as expected.
Marked as Passed QA.
Comment 4 Jonathan Druart 2013-07-18 11:52:34 UTC
Created attachment 19758 [details] [review]
Bug 10595 - OpacTopissue page still accessible 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>
Comment 5 Galen Charlton 2013-07-18 13:54:29 UTC
Pushed to master.  Thanks, Mirko!
Comment 6 Tomás Cohen Arazi 2013-08-14 14:34:13 UTC
This patch has been pushed to 3.12.x, will be in 3.12.4.

Thanks Mirko!
Comment 7 Bernardo Gonzalez Kriegel 2013-09-13 21:21:57 UTC
Pushed to 3.10.x, will be in 3.10.11
Comment 8 Chris Hall 2013-09-15 05:21:28 UTC
Pushed to 3.8.x, will be in 3.8.18