Fixed a whole bunch of warnings and minor bugs, which all shared a common cause:

The preferences screens weren't handling filter changes correctly.
This commit is contained in:
defacer 2004-04-20 12:49:02 +00:00
parent 562727705f
commit 053c98cff9
3 changed files with 8 additions and 2 deletions

View File

@ -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'];

View File

@ -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 '<p>';
echo calendar_top_controls('display', array('m' => $prevmon, 'y' => $prevyr));
echo calendar_get_mini($courses, $groups, $users, $prevmon, $prevyr);

View File

@ -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']);