From 4569cae57f127afd093794310ccd290d2d9fdf36 Mon Sep 17 00:00:00 2001 From: Marius Burkard <m.burkard@pixcept.de> Date: Wed, 20 Apr 2016 10:58:46 -0400 Subject: [PATCH] Merge branch 'stable-3.1' --- interface/lib/classes/remote.d/sites.inc.php | 19 +++++++++++++++++-- 1 files changed, 17 insertions(+), 2 deletions(-) diff --git a/interface/lib/classes/remote.d/sites.inc.php b/interface/lib/classes/remote.d/sites.inc.php index ad3f2e3..22c1657 100644 --- a/interface/lib/classes/remote.d/sites.inc.php +++ b/interface/lib/classes/remote.d/sites.inc.php @@ -127,9 +127,9 @@ $this->id = 0; $this->dataRecord = $params; - $app->sites_database_plugin->processDatabaseInsert($this); $retval = $this->insertQueryExecute($sql, $params); + $app->sites_database_plugin->processDatabaseInsert($this); // set correct values for backup_interval and backup_copies if(isset($params['backup_interval']) || isset($params['backup_copies'])){ @@ -931,7 +931,7 @@ return false; } - if ($action_type != 'backup_download' and $action_type != 'backup_restore') { + if ($action_type != 'backup_download' and $action_type != 'backup_restore' and $action_type != 'backup_delete') { $this->server->fault('invalid_action', "Invalid action_type $action_type"); return false; } @@ -980,6 +980,21 @@ return $app->quota_lib->get_trafficquota_data($client_id, $lastdays); } + public function ftptrafficquota_data($session_id, $client_id, $lastdays = 0) + { + global $app; + $app->uses('quota_lib'); + + if(!$this->checkPerm($session_id, 'trafficquota_get_by_user')) { + $this->server->fault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + if ($client_id != null) + $client_id = $app->functions->intval($client_id); + + return $app->quota_lib->get_ftptrafficquota_data($client_id, $lastdays); + } + public function databasequota_get_by_user($session_id, $client_id) { global $app; -- Gitblit v1.9.1