From: moodler Date: Tue, 28 Sep 2004 15:58:13 +0000 (+0000) Subject: Merged from STABLE X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=ac87e234242d9f042710fae286092ca75be22ba6;p=moodle.git Merged from STABLE --- diff --git a/course/edit.php b/course/edit.php index 719efc5504..6758a8943c 100644 --- a/course/edit.php +++ b/course/edit.php @@ -5,8 +5,8 @@ require_once("lib.php"); require_once("$CFG->libdir/blocklib.php"); - optional_variable($id, 0); // course id - optional_variable($category, 0); // category id + $id = (int)parameter('id', 0); // course id + $category = (int)parameter('category', 0); // possible default category require_login(); diff --git a/course/mod.php b/course/mod.php index 0fd037930d..8e9b7e8a5d 100644 --- a/course/mod.php +++ b/course/mod.php @@ -35,7 +35,9 @@ error("You can't modify this course!"); } + $mod->modulename = clean_filename($mod->modulename); // For safety $modlib = "$CFG->dirroot/mod/$mod->modulename/lib.php"; + if (file_exists($modlib)) { include_once($modlib); } else {