]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed course theme MDL-10833
authormoodler <moodler>
Mon, 13 Aug 2007 13:36:52 +0000 (13:36 +0000)
committermoodler <moodler>
Mon, 13 Aug 2007 13:36:52 +0000 (13:36 +0000)
backup/backup.php

index fe90468d367d55bccc0005d6a6980654e0197e19..766682f8c72c7a6d0ce7b1e89a6d3a362175ead0 100644 (file)
     $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");
         }