Marius Cramer
2015-01-21 82cf1e84254fc9023b4871ba40967cc4966c9452
interface/lib/classes/plugin_backuplist_mail.inc.php
@@ -39,6 +39,9 @@
   function onShow() {
      global $app;
      $app->uses('functions');
      $listTpl = new tpl;
      $listTpl->newTemplate('templates/mail_user_backup_list.htm');
            
@@ -53,7 +56,7 @@
      if(isset($_GET['backup_action'])) {
         $backup_id = $app->functions->intval($_GET['backup_id']);
/*
         if($_GET['backup_action'] == 'download' && $backup_id > 0) {
         if($_GET['backup_action'] == 'download_mail' && $backup_id > 0) {
            $sql = "SELECT count(action_id) as number FROM sys_remoteaction WHERE action_state = 'pending' AND action_type = 'backup_download' AND action_param = '$backup_id'";
            $tmp = $app->db->queryOneRecord($sql);
            if($tmp['number'] == 0) {
@@ -73,8 +76,8 @@
            }
         }
*/
         if($_GET['backup_action'] == 'restore' && $backup_id > 0) {
            $sql = "SELECT count(action_id) as number FROM sys_remoteaction WHERE action_state = 'pending' AND action_type = 'backup_restore' AND action_param = '$backup_id'";
         if($_GET['backup_action'] == 'restore_mail' && $backup_id > 0) {
            $sql = "SELECT count(action_id) as number FROM sys_remoteaction WHERE action_state = 'pending' AND action_type = 'backup_restore_mail' AND action_param = '$backup_id'";
            $tmp = $app->db->queryOneRecord($sql);
            if($tmp['number'] == 0) {
               $message .= $wb['restore_info_txt'];
@@ -82,7 +85,7 @@
               "VALUES (".
                  (int)$this->form->dataRecord['server_id'] . ", " .
                  time() . ", " .
                  "'backup_restore', " .
                  "'backup_restore_mail', " .
                  "'".$backup_id."', " .
                  "'pending', " .
                  "''" .
@@ -105,6 +108,7 @@
            $rec["bgcolor"] = $bgcolor;
            $rec['date'] = date($app->lng('conf_format_datetime'),$rec['tstamp']);
            $rec['backup_type'] = $wb[('backup_type_'.$rec['backup_type'])];
            $rec['filesize'] = $app->functions->formatBytes($rec['filesize']);
            $records_new[] = $rec;
         }
      }