From 053c98cff976a818279abcbf188b6be1d81886ce Mon Sep 17 00:00:00 2001 From: defacer Date: Tue, 20 Apr 2004 12:49:02 +0000 Subject: [PATCH] Fixed a whole bunch of warnings and minor bugs, which all shared a common cause: The preferences screens weren't handling filter changes correctly. --- calendar/lib.php | 3 +++ calendar/preferences.php | 2 +- calendar/set.php | 5 ++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/calendar/lib.php b/calendar/lib.php index 9a6ce1ae1a..0edc01ad77 100644 --- a/calendar/lib.php +++ b/calendar/lib.php @@ -567,6 +567,9 @@ function calendar_filter_controls($type) { case 'upcoming': $getvars = ''; break; + case 'prefs': + $getvars = '&from=prefs&pref='.$_GET['edit']; + break; case 'event': global $day, $mon, $yr; $getvars = '&from=event&id='.$_GET['id']; diff --git a/calendar/preferences.php b/calendar/preferences.php index 5cc3d5f16e..16b525d35d 100644 --- a/calendar/preferences.php +++ b/calendar/preferences.php @@ -258,7 +258,7 @@ list($prevmon, $prevyr) = calendar_sub_month($mon, $yr); list($nextmon, $nextyr) = calendar_add_month($mon, $yr); - echo calendar_filter_controls($_GET['view']); + echo calendar_filter_controls('prefs'); echo '

'; echo calendar_top_controls('display', array('m' => $prevmon, 'y' => $prevyr)); echo calendar_get_mini($courses, $groups, $users, $prevmon, $prevyr); diff --git a/calendar/set.php b/calendar/set.php index bf4af68152..709b40aa00 100644 --- a/calendar/set.php +++ b/calendar/set.php @@ -89,8 +89,11 @@ } switch($_GET['from']) { + case 'prefs': + redirect($CFG->wwwroot.'/calendar/preferences.php?edit='.$_GET['pref']); + break; case 'month': - redirect($CFG->wwwroot.'/calendar/view.php?view=month&cal_d='.$_GET['cal_d'].'&cal_m='.$_GET['cal_m'].'&cal_y='.$_GET['cal_y']); + redirect($CFG->wwwroot.'/calendar/view.php?view=month&cal_d='.$_GET['cal_d'].'&cal_m='.$_GET['cal_m'].'&cal_y='.$_GET['cal_y']); break; case 'upcoming': redirect($CFG->wwwroot.'/calendar/view.php?view=upcoming&cal_d='.$_GET['cal_d'].'&cal_m='.$_GET['cal_m'].'&cal_y='.$_GET['cal_y']); -- 2.39.5