]> git.mjollnir.org Git - moodle.git/commitdiff
Minor changes in course_files_check_backup to avoid the backup
authorstronk7 <stronk7>
Tue, 13 May 2003 19:53:17 +0000 (19:53 +0000)
committerstronk7 <stronk7>
Tue, 13 May 2003 19:53:17 +0000 (19:53 +0000)
of files under get_string("backupdir")

backup/lib.php

index 52e022f5bf98b29638e5f3c4c432d07777f27c1c..2f495b7afc0c0c1e79e1578c391a193c29d03993 100644 (file)
         //Check if directory exists
         if (is_dir($rootdir)) {
             $coursedirs = get_directory_list($rootdir,$CFG->moddata);
+            $backupdir = get_string("backupdir");
             foreach ($coursedirs as $dir) {
                 //Check it isn't backupdir
-                if (dirname($dir) !== get_string("backupdir")) {
+                if (strpos($dir,$backupdir)!==0) {
                     //Insert them into backup_files
                     $status = execute_sql("INSERT INTO {$CFG->prefix}backup_files
                                                   (backup_code, file_type, path)