diff --git a/module/backup/control.php b/module/backup/control.php index 1de19dc8f5..492bf819be 100644 --- a/module/backup/control.php +++ b/module/backup/control.php @@ -43,18 +43,22 @@ class backup extends control $backups = array(); if(empty($this->view->error)) { - foreach(glob("{$this->backupPath}*.sql.php") as $file) + $sqlFiles = glob("{$this->backupPath}*.sql.php"); + if(!empty($sqlFiles)) { - $backupFile = new stdclass(); - $backupFile->time = filemtime($file); - $backupFile->name = str_replace('.sql.php', '', basename($file)); - $backupFile->files[$file] = filesize($file); - if(file_exists($this->backupPath . $backupFile->name . '.file.zip.php')) + foreach($sqlFiles as $file) { - $backupFile->files[$this->backupPath . $backupFile->name . '.file.zip.php'] = filesize($this->backupPath . $backupFile->name . '.file.zip.php'); - } + $backupFile = new stdclass(); + $backupFile->time = filemtime($file); + $backupFile->name = str_replace('.sql.php', '', basename($file)); + $backupFile->files[$file] = filesize($file); + if(file_exists($this->backupPath . $backupFile->name . '.file.zip.php')) + { + $backupFile->files[$this->backupPath . $backupFile->name . '.file.zip.php'] = filesize($this->backupPath . $backupFile->name . '.file.zip.php'); + } - $backups[$backupFile->name] = $backupFile; + $backups[$backupFile->name] = $backupFile; + } } } krsort($backups); diff --git a/module/editor/model.php b/module/editor/model.php index 281101070b..af655dc250 100644 --- a/module/editor/model.php +++ b/module/editor/model.php @@ -60,7 +60,11 @@ class editorModel extends model elseif(is_dir($moduleFullFile)) { $ext = ($moduleFile == 'js' or $moduleFile == 'css') ? $moduleFile : 'php'; - foreach(glob($moduleFullFile . $this->pathFix . "*.$ext") as $fileName) $allModules[$moduleFullDir][$moduleFullFile][$fileName] = basename($fileName); + $extFiles = glob($moduleFullFile . $this->pathFix . "*.$ext"); + if(!empty($extFiles)) + { + foreach($extFiles as $fileName) $allModules[$moduleFullDir][$moduleFullFile][$fileName] = basename($fileName); + } } else { diff --git a/module/project/view/taskheader.html.php b/module/project/view/taskheader.html.php index 4c700dd120..0903651910 100644 --- a/module/project/view/taskheader.html.php +++ b/module/project/view/taskheader.html.php @@ -87,5 +87,10 @@