diff --git a/out/out.BackupTools.php b/out/out.BackupTools.php index 7d2138391..7437d38e3 100644 --- a/out/out.BackupTools.php +++ b/out/out.BackupTools.php @@ -30,8 +30,12 @@ if (!$user->isAdmin()) { } $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'contentdir'=>$settings->_contentDir)); +$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { + if($settings->_backupDir && file_exists($settings->_backupDir)) + $view->setParam('backupdir', $settings->_backupDir); + else + $view->setParam('backupdir', $settings->_contentDir); $view->show(); exit; } diff --git a/views/bootstrap/class.BackupTools.php b/views/bootstrap/class.BackupTools.php index d1cd6444a..bc4408a0f 100644 --- a/views/bootstrap/class.BackupTools.php +++ b/views/bootstrap/class.BackupTools.php @@ -34,7 +34,7 @@ class SeedDMS_View_BackupTools extends SeedDMS_Bootstrap_Style { function show() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; - $contentdir = $this->params['contentdir']; + $backupdir = $this->params['backupdir']; $this->htmlStartPage(getMLText("backup_tools")); $this->globalNavigation(); @@ -43,7 +43,7 @@ class SeedDMS_View_BackupTools extends SeedDMS_Bootstrap_Style { $this->contentHeading(getMLText("backup_tools")); $this->contentContainerStart(); - print getMLText("space_used_on_data_folder")." : ".SeedDMS_Core_File::format_filesize(dskspace($contentdir)); + print getMLText("space_used_on_data_folder")." : ".SeedDMS_Core_File::format_filesize(dskspace($backupdir)); $this->contentContainerEnd(); // versioning file creation //////////////////////////////////////////////////// @@ -76,10 +76,10 @@ class SeedDMS_View_BackupTools extends SeedDMS_Bootstrap_Style { $print_header=true; - $handle = opendir($contentdir); + $handle = opendir($backupdir); $entries = array(); while ($e = readdir($handle)){ - if (is_dir($contentdir.$e)) continue; + if (is_dir($backupdir.$e)) continue; if (strpos($e,".tar.gz")==FALSE) continue; $entries[] = $e; } @@ -109,8 +109,8 @@ class SeedDMS_View_BackupTools extends SeedDMS_Bootstrap_Style { print "