]> git.mjollnir.org Git - moodle.git/commitdiff
backupdata folder is not visible in directory resource any more, the backup files...
authorskodak <skodak>
Sat, 16 Sep 2006 17:15:18 +0000 (17:15 +0000)
committerskodak <skodak>
Sat, 16 Sep 2006 17:15:18 +0000 (17:15 +0000)
file.php

index ee170b83fb170e2c8b8b13d1341355c9e67e4179..e8501000d5910f03c99af2ad1a3999528e06cee3 100644 (file)
--- a/file.php
+++ b/file.php
     }
 
     // security: only editing teachers can access backups
-    if ((!has_capability('moodle/site:backup', get_context_instance(CONTEXT_COURSE, $course->id)))
-        and (count($args) >= 2)
-        and (strtolower($args[1]) == 'backupdata')) {
-
-        error('Access not allowed');
+    if ((count($args) >= 2) and (strtolower($args[1]) == 'backupdata')) {
+        if (!has_capability('moodle/site:backup', get_context_instance(CONTEXT_COURSE, $course->id))) {
+            error('Access not allowed');
+        } else {
+            $lifetime = 0; //disable browser caching for backups 
+        }
     }
 
     if (is_dir($pathname)) {