From: moodler Date: Mon, 13 Aug 2007 13:36:52 +0000 (+0000) Subject: Fixed course theme MDL-10833 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f12621d33298b40bcefbe93e0366b2962ad71f7a;p=moodle.git Fixed course theme MDL-10833 --- diff --git a/backup/backup.php b/backup/backup.php index fe90468d36..766682f8c7 100644 --- a/backup/backup.php +++ b/backup/backup.php @@ -14,13 +14,14 @@ $cancel = optional_param( 'cancel' ); $launch = optional_param( 'launch' ); - require_login(); if (!empty($id)) { + require_login($id); if (!has_capability('moodle/site:backup', get_context_instance(CONTEXT_COURSE, $id))) { error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php"); } } else { + require_login(); if (!has_capability('moodle/site:backup', get_context_instance(CONTEXT_SYSTEM, SITEID))) { error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php"); }