From: defacer Date: Mon, 17 May 2004 07:31:54 +0000 (+0000) Subject: Fix for bug 1395: X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=4131f3743fb4d2c3636bce3820756846cbe63bff;p=moodle.git Fix for bug 1395: view.php now does require_login(). Also some minor refinements. --- diff --git a/calendar/view.php b/calendar/view.php index 52e16ef7a1..33704907e2 100644 --- a/calendar/view.php +++ b/calendar/view.php @@ -44,7 +44,9 @@ require_once('lib.php'); require_once('../course/lib.php'); - optional_variable($_GET['view'], "upcoming"); + require_login(); + + optional_variable($_GET['view'], 'upcoming'); optional_variable($_GET['cal_d']); optional_variable($_GET['cal_m']); optional_variable($_GET['cal_y']); @@ -54,11 +56,6 @@ } //add_to_log($course->id, "course", "view", "view.php?id=$course->id", "$course->id"); - - $side = 175; - - $prefmenu = true; // By default, display it - calendar_session_vars(); $now = usergetdate(time()); $pagetitle = ''; @@ -117,11 +114,11 @@ // Layout the whole page as three big columns. echo ''; - echo ''; + echo ''; // START: Main column - echo ''; echo '
'; + echo ''; if($_GET['view'] == 'month') { if(is_numeric($SESSION->cal_show_course)) { @@ -182,7 +179,7 @@ // END: Main column // START: Last column (3-month display) - echo ''; + echo ''; print_side_block_start(get_string('monthlyview', 'calendar'), '', 'sideblockmain'); list($prevmon, $prevyr) = calendar_sub_month($mon, $yr); list($nextmon, $nextyr) = calendar_add_month($mon, $yr); @@ -199,7 +196,7 @@ echo calendar_get_mini($courses, $groups, $users, $nextmon, $nextyr); echo '

'; print_side_block_end(); - print_spacer(1, $side); + print_spacer(1, 180); echo '
';