Skip to content

Commit c7e2316

Browse files
committed
moved quota-functions to site and mail-file
1 parent 6eca510 commit c7e2316

File tree

3 files changed

+30
-77
lines changed

3 files changed

+30
-77
lines changed

interface/lib/classes/remote.d/mail.inc.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,6 +1024,20 @@ public function mail_domain_set_status($session_id, $primary_id, $status) {
10241024
}
10251025
}
10261026

1027+
//** quota functions -----------------------------------------------------------------------------------
1028+
public function mailquota_get_by_user($session_id, $group_id)
1029+
{
1030+
global $app;
1031+
$app->uses('quota_lib');
1032+
1033+
if(!$this->checkPerm($session_id, 'mailquota_get_by_user')) {
1034+
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
1035+
return false;
1036+
}
1037+
$group_id = $app->functions->intval($group_id);
1038+
1039+
return $app->quota_lib->get_mailquota_data($group_id, false);
1040+
}
10271041

10281042
}
10291043

interface/lib/classes/remote.d/monitor.inc.php

Lines changed: 0 additions & 77 deletions
This file was deleted.

interface/lib/classes/remote.d/sites.inc.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -872,6 +872,22 @@ public function sites_database_get_all_by_user($session_id, $client_id)
872872
return $all;
873873
}
874874

875+
//** quota functions -----------------------------------------------------------------------------------
876+
public function quota_get_by_user($session_id, $group_id)
877+
{
878+
global $app;
879+
$app->uses('quota_lib');
880+
881+
if(!$this->checkPerm($session_id, 'quota_get_by_user')) {
882+
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
883+
return false;
884+
}
885+
$group_id = $app->functions->intval($group_id);
886+
887+
return $app->quota_lib->get_quota_data($group_id, false);
888+
}
889+
890+
875891
}
876892

877893
?>

0 commit comments

Comments
 (0)