Bugzilla – Attachment 19698 Details for
Bug 10595
OpacTopissue page still accessible when system preference is turned off
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10595 - OpacTopissue page still accessible when system preference is turned off
Bug-10595---OpacTopissue-page-still-accessible-whe.patch (text/plain), 1.58 KB, created by
Mirko Tietgen
on 2013-07-16 19:59:08 UTC
(
hide
)
Description:
Bug 10595 - OpacTopissue page still accessible when system preference is turned off
Filename:
MIME Type:
Creator:
Mirko Tietgen
Created:
2013-07-16 19:59:08 UTC
Size:
1.58 KB
patch
obsolete
>From 19e3210dd7c0e15b36dfaad6323fe1db9a4feb0a Mon Sep 17 00:00:00 2001 >From: Mirko Tietgen <mirko@abunchofthings.net> >Date: Tue, 16 Jul 2013 21:51:01 +0200 >Subject: [PATCH] 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. >--- > opac/opac-topissues.pl | 7 +++++++ > 1 files changed, 7 insertions(+), 0 deletions(-) > >diff --git a/opac/opac-topissues.pl b/opac/opac-topissues.pl >index 96b0c8f..95291d0 100755 >--- a/opac/opac-topissues.pl >+++ b/opac/opac-topissues.pl >@@ -40,6 +40,13 @@ plugin that shows a stats on borrowers > =cut > > my $input = new CGI; >+ >+# if OpacTopissue is disabled, leave immediately >+if ( ! C4::Context->preference('OpacTopissue') ) { >+ print $input->redirect("/cgi-bin/koha/errors/404.pl"); >+ exit; >+} >+ > my $branches = GetBranches(); > my $itemtypes = GetItemTypes(); > >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10595
:
19698
|
19703
|
19758