Permalink
Browse files

Don't redirect too early

  • Loading branch information...
1 parent d66ee54 commit b8391635286f2f53dcc3e3d8e58e9b84f9b7d128 martin committed Sep 25, 2002
Showing with 5 additions and 4 deletions.
  1. +5 −4 course/view.php
View
9 course/view.php
@@ -22,10 +22,6 @@
}
}
- if (! $course->category) { // This course is not a real course.
- redirect("$CFG->wwwroot");
- }
-
require_login($id);
add_to_log($course->id, "course", "view", "view.php?id=$course->id", "$course->id");
@@ -47,6 +43,11 @@
$SESSION->fromdiscussion = "$CFG->wwwroot/course/view.php?id=$course->id";
save_session("SESSION");
+ if (! $course->category) { // This course is not a real course.
+ redirect("$CFG->wwwroot/");
+ }
+
+
$courseword = get_string("course");
print_header("$courseword: $course->fullname", "$course->fullname", "$course->shortname", "search.search", "", true,

0 comments on commit b839163

Please sign in to comment.