From 8938c852f00cbd4aa62772a2bafd528c71180772 Mon Sep 17 00:00:00 2001
From: Marius Cramer <m.cramer@pixcept.de>
Date: Fri, 20 Nov 2015 02:23:15 -0500
Subject: [PATCH] Merge branch 'master' into 'master'
---
interface/lib/classes/plugin_backuplist_mail.inc.php | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/interface/lib/classes/plugin_backuplist_mail.inc.php b/interface/lib/classes/plugin_backuplist_mail.inc.php
index 901901a..2c3e7a3 100644
--- a/interface/lib/classes/plugin_backuplist_mail.inc.php
+++ b/interface/lib/classes/plugin_backuplist_mail.inc.php
@@ -62,11 +62,24 @@
if($tmp['number'] == 0) {
$message .= $wb['restore_info_txt'];
$sql = "INSERT INTO sys_remoteaction (server_id, tstamp, action_type, action_param, action_state, response) " .
- "VALUES (?, ? 'backup_restore_mail', ?, 'pending','')";
+ "VALUES (?, ?, 'backup_restore_mail', ?, 'pending','')";
$app->db->query($sql, $this->form->dataRecord['server_id'], time(), $backup_id);
} else {
$error .= $wb['restore_pending_txt'];
}
+ }
+
+ if($_GET['backup_action'] == 'delete_mail' && $backup_id > 0) {
+ $sql = "SELECT count(action_id) as number FROM sys_remoteaction WHERE action_state = 'pending' AND action_type = 'backup_delete_mail' 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 (?, ?, 'backup_delete_mail, ?, 'pending', '')";
+ $app->db->query($sql, $this->form->dataRecord['server_id'], time(), $backup_id);
+ } else {
+ $error .= $wb['delete_pending_txt'];
+ }
}
}
--
Gitblit v1.9.1