Marius Burkard
2016-04-19 b2cee83e8894e89fd3e0793c84fb92a8cf928613
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;