Minor changes in course_files_check_backup to avoid the backup

of files under get_string("backupdir")
This commit is contained in:
stronk7
2003-05-13 19:53:17 +00:00
parent 21951923a5
commit 4f446b2e36
+2 -1
View File
@@ -174,9 +174,10 @@
//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)