From 83f3c62dbebca8d08f1070259087dab845245aef Mon Sep 17 00:00:00 2001 From: moodler Date: Sun, 26 Sep 2004 02:42:54 +0000 Subject: [PATCH] Fixed my recently introduced bug with the redirect bug 2000 --- course/view.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/course/view.php b/course/view.php index 6b4050f9d0..3e53f96a94 100644 --- a/course/view.php +++ b/course/view.php @@ -23,10 +23,6 @@ } } - if ($course->id == SITEID) { // This course is not a real course. - redirect("$CFG->wwwroot/"); - } - require_login($course->id); require_once($CFG->dirroot.'/calendar/lib.php'); /// This is after login because it needs $USER @@ -139,6 +135,10 @@ $SESSION->fromdiscussion = "$CFG->wwwroot/course/view.php?id=$course->id"; + if ($course->id == SITEID) { // This course is not a real course. + redirect("$CFG->wwwroot/"); + } + $strcourse = get_string("course"); $loggedinas = "

".user_login_string($course, $USER)."

"; -- 2.39.5