]> git.mjollnir.org Git - moodle.git/commitdiff
Fix for bug 1527:
authordefacer <defacer>
Wed, 23 Jun 2004 09:53:23 +0000 (09:53 +0000)
committerdefacer <defacer>
Wed, 23 Jun 2004 09:53:23 +0000 (09:53 +0000)
The New Event button is back in day view. Silly mistake, $USER wasn't taken
from the globals and thus it always thought you weren't logged in.

calendar/view.php

index a76898ca100cc54eb01186196021abf44693eaac..0e475cd20724bdb144873c91517bb0d0a886c739 100644 (file)
 
 
 function calendar_show_day($d, $m, $y, $courses, $groups, $users) {
-    global $CFG, $THEME, $db;
+    global $CFG, $THEME, $USER, $db;
 
     if (!checkdate($m, $d, $y)) {
         $now = usergetdate(time());
@@ -200,7 +200,6 @@ function calendar_show_day($d, $m, $y, $courses, $groups, $users) {
     // New event button
     if (empty($USER) || isguest()) {
         $text = get_string('dayview', 'calendar').': '.calendar_course_filter_selector($getvars);
-
     } else {
         $text = '<div style="float: left;">'.get_string('dayview', 'calendar').': '.
                 calendar_course_filter_selector($getvars).'</div><div style="float: right;">';