remove unused local variables
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -159,8 +159,6 @@ class EmailForwarders extends ApiCommand implements ResourceEntity
|
|||||||
// get needed customer info to reduce the email-forwarder-counter by one
|
// get needed customer info to reduce the email-forwarder-counter by one
|
||||||
$customer = $this->getCustomerData();
|
$customer = $this->getCustomerData();
|
||||||
|
|
||||||
// get specific forwarder
|
|
||||||
$forwarder = $result['destination'][$forwarderid];
|
|
||||||
// unset it from array
|
// unset it from array
|
||||||
unset($result['destination'][$forwarderid]);
|
unset($result['destination'][$forwarderid]);
|
||||||
// rebuild destination-string
|
// rebuild destination-string
|
||||||
@@ -177,13 +175,6 @@ class EmailForwarders extends ApiCommand implements ResourceEntity
|
|||||||
);
|
);
|
||||||
Database::pexecute($stmt, $params, true, true);
|
Database::pexecute($stmt, $params, true, true);
|
||||||
|
|
||||||
$stmt = Database::prepare("UPDATE `" . TABLE_PANEL_CUSTOMERS . "`
|
|
||||||
SET `email_forwarders_used` = `email_forwarders_used` - 1
|
|
||||||
WHERE `customerid`= :cid");
|
|
||||||
Database::pexecute($stmt, array(
|
|
||||||
"cid" => $userinfo['customerid']
|
|
||||||
));
|
|
||||||
|
|
||||||
// update customer usage
|
// update customer usage
|
||||||
Customers::decreaseUsage($customer['customerid'], 'email_forwarders_used');
|
Customers::decreaseUsage($customer['customerid'], 'email_forwarders_used');
|
||||||
|
|
||||||
|
|||||||
@@ -122,7 +122,6 @@ class Emails extends ApiCommand implements ResourceEntity
|
|||||||
"domainid" => $domain_check['id']
|
"domainid" => $domain_check['id']
|
||||||
);
|
);
|
||||||
Database::pexecute($stmt, $params, true, true);
|
Database::pexecute($stmt, $params, true, true);
|
||||||
$address_id = Database::lastInsertId();
|
|
||||||
|
|
||||||
// update customer usage
|
// update customer usage
|
||||||
Customers::increaseUsage($customer['customerid'], 'emails_used');
|
Customers::increaseUsage($customer['customerid'], 'emails_used');
|
||||||
|
|||||||
@@ -718,7 +718,6 @@ class SubDomains extends ApiCommand implements ResourceEntity
|
|||||||
|
|
||||||
// get needed customer info to reduce the subdomain-usage-counter by one
|
// get needed customer info to reduce the subdomain-usage-counter by one
|
||||||
$customer = $this->getCustomerData();
|
$customer = $this->getCustomerData();
|
||||||
$subdomains_used = $customer['subdomains_used'];
|
|
||||||
|
|
||||||
if (!$this->isAdmin() && $result['caneditdomain'] == 0) {
|
if (!$this->isAdmin() && $result['caneditdomain'] == 0) {
|
||||||
throw new Exception("You cannot edit this resource", 405);
|
throw new Exception("You cannot edit this resource", 405);
|
||||||
|
|||||||
Reference in New Issue
Block a user