Bugzilla – Attachment 64853 Details for
Bug 18902
Course Reserves still accessible by URL even if turned OFF
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18902: Disable access to CourseReserves if syspref off.
Bug-18902-Disable-access-to-CourseReserves-if-sysp.patch (text/plain), 2.42 KB, created by
Alex Sassmannshausen
on 2017-07-06 15:41:22 UTC
(
hide
)
Description:
Bug 18902: Disable access to CourseReserves if syspref off.
Filename:
MIME Type:
Creator:
Alex Sassmannshausen
Created:
2017-07-06 15:41:22 UTC
Size:
2.42 KB
patch
obsolete
>From 3d831ed9420d4b799b01ddb1f0670c02b914568b Mon Sep 17 00:00:00 2001 >From: Alex Sassmannshausen <alex.sassmannshausen@ptfs-europe.com> >Date: Thu, 6 Jul 2017 17:35:41 +0200 >Subject: [PATCH] Bug 18902: Disable access to CourseReserves if syspref off. > >* course_reserves/course-reserves.pl: Add syspref check. >* course_reserves/mod_course.pl: Add syspref check. >* opac/opac-course-reserves.pl: Add syspref check. >--- > course_reserves/course-reserves.pl | 6 ++++++ > course_reserves/mod_course.pl | 7 +++++++ > opac/opac-course-reserves.pl | 6 ++++++ > 3 files changed, 19 insertions(+) > >diff --git a/course_reserves/course-reserves.pl b/course_reserves/course-reserves.pl >index ca666969d4..5c203d7f0b 100755 >--- a/course_reserves/course-reserves.pl >+++ b/course_reserves/course-reserves.pl >@@ -29,6 +29,12 @@ use C4::CourseReserves qw(GetCourses); > > my $cgi = new CGI; > >+unless (C4::Context->preference('UseCourseReserves')) { >+ # redirect to Intranet home if self-check is not enabled >+ print $cgi->redirect("/cgi-bin/koha/mainpage.pl"); >+ exit; >+} >+ > my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > { > template_name => "course_reserves/course-reserves.tt", >diff --git a/course_reserves/mod_course.pl b/course_reserves/mod_course.pl >index 844d157dd1..ac0c839aba 100755 >--- a/course_reserves/mod_course.pl >+++ b/course_reserves/mod_course.pl >@@ -28,6 +28,13 @@ use C4::Auth; > use C4::CourseReserves qw(DelCourse ModCourse ModCourseInstructors); > > my $cgi = new CGI; >+ >+unless (C4::Context->preference('UseCourseReserves')) { >+ # redirect to Intranet home if self-check is not enabled >+ print $cgi->redirect("/cgi-bin/koha/mainpage.pl"); >+ exit; >+} >+ > my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > { template_name => "about.tt", > query => $cgi, >diff --git a/opac/opac-course-reserves.pl b/opac/opac-course-reserves.pl >index de1498b77f..51297a6594 100755 >--- a/opac/opac-course-reserves.pl >+++ b/opac/opac-course-reserves.pl >@@ -29,6 +29,12 @@ use C4::CourseReserves qw(SearchCourses); > > my $cgi = new CGI; > >+unless (C4::Context->preference('UseCourseReserves')) { >+ # redirect to Intranet home if self-check is not enabled >+ print $cgi->redirect("/cgi-bin/koha/opac-main.pl"); >+ exit; >+} >+ > my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > { template_name => "opac-course-reserves.tt", > query => $cgi, >-- >2.13.2
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 18902
:
64853
|
64854
|
65289
|
65308