Dominik
2015-11-19 634132a0d83a3c83a3927e2aa943c035030d6b80
interface/lib/classes/plugin_backuplist.inc.php
@@ -96,6 +96,28 @@
               $error .= $wb['restore_pending_txt'];
            }
         }
         if($_GET['backup_action'] == 'delete' && $backup_id > 0) {
            $server_id = $this->form->dataRecord['server_id'];
            $backup = $app->db->queryOneRecord("SELECT * FROM web_backup WHERE backup_id = ".$backup_id);
            if($backup['server_id'] > 0) $server_id = $backup['server_id'];
            $sql = "SELECT count(action_id) as number FROM sys_remoteaction WHERE action_state = 'pending' AND action_type = 'backup_delete' AND action_param = '$backup_id'";
            $tmp = $app->db->queryOneRecord($sql);
            if($tmp['number'] == 0) {
               $message .= $wb['delete_info_txt'];
               $sql =  "INSERT INTO sys_remoteaction (server_id, tstamp, action_type, action_param, action_state, response) " .
                  "VALUES (".
                  (int)$server_id . ", " .
                  time() . ", " .
                  "'backup_delete', " .
                  "'".$backup_id."', " .
                  "'pending', " .
                  "''" .
                  ")";
               $app->db->query($sql);
            } else {
               $error .= $wb['delete_pending_txt'];
            }
         }
      }