From 82cf1e84254fc9023b4871ba40967cc4966c9452 Mon Sep 17 00:00:00 2001
From: Marius Cramer <m.cramer@pixcept.de>
Date: Wed, 21 Jan 2015 04:13:19 -0500
Subject: [PATCH] Merge branch 'renky/ispconfig3-master'
---
interface/lib/classes/plugin_backuplist_mail.inc.php | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/interface/lib/classes/plugin_backuplist_mail.inc.php b/interface/lib/classes/plugin_backuplist_mail.inc.php
index 5bef570..8474283 100644
--- a/interface/lib/classes/plugin_backuplist_mail.inc.php
+++ b/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;
}
}
--
Gitblit v1.9.1