From 28cdd92aabd0285cddad2e644bd7a67046340f95 Mon Sep 17 00:00:00 2001 From: Richard Mansfield Date: Tue, 26 Apr 2011 14:45:03 +1200 Subject: [PATCH] Fix check of overriding view start/stop dates (bug #746182) Signed-off-by: Richard Mansfield --- htdocs/lib/mahara.php | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/htdocs/lib/mahara.php b/htdocs/lib/mahara.php index e8eeaeb..71d8337 100644 --- a/htdocs/lib/mahara.php +++ b/htdocs/lib/mahara.php @@ -1370,6 +1370,12 @@ function can_view_view($view_id, $user_id=null) { return true; } + // All other access types are overridden by start/stop dates on the view + if ((!empty($view_record['startdate']) && $view_record['startdate'] > $now) + || (!empty($view_record['stopdate']) && $view_record['stopdate'] < $now)) { + return false; + } + // check public if ( get_config('allowpublicviews') == '1' -- 1.7.1