|
|
@@ -31,7 +31,7 @@ class UpdateDistributionList extends CreateDistributionList
|
|
|
$result = $this->api->account->getAccountId($owner);
|
|
|
if($result->getLastError())
|
|
|
{
|
|
|
- $this->setError($result->getLastError());
|
|
|
+ $this->setError($this->api->account->getLastResult()->getLastErrorCode());
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
@@ -48,7 +48,7 @@ class UpdateDistributionList extends CreateDistributionList
|
|
|
$result = $this->api->domain->getDomain($domain);
|
|
|
if($result->getLastError())
|
|
|
{
|
|
|
- $this->setError($result->getLastError());
|
|
|
+ $this->setError($this->api->domain->getLastResult()->getLastErrorCode());
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
@@ -78,7 +78,8 @@ class UpdateDistributionList extends CreateDistributionList
|
|
|
|
|
|
if (!$result)
|
|
|
{
|
|
|
- //todo save error
|
|
|
+ $this->setError($this->api->distributionList->getLastResult()->getLastErrorCode());
|
|
|
+ return false;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -205,6 +206,11 @@ class UpdateDistributionList extends CreateDistributionList
|
|
|
* remove old members
|
|
|
*/
|
|
|
$result = $this->api->distributionList->deleteMembers($list);
|
|
|
+ if (!$result)
|
|
|
+ {
|
|
|
+ $this->setError($this->api->distributionList->getLastResult()->getLastErrorCode());
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* return success
|
|
|
@@ -279,6 +285,11 @@ class UpdateDistributionList extends CreateDistributionList
|
|
|
* delete owners from list
|
|
|
*/
|
|
|
$result = $this->api->distributionList->deleteOwners($list);
|
|
|
+ if (!$result)
|
|
|
+ {
|
|
|
+ $this->setError($this->api->distributionList->getLastResult()->getLastErrorCode());
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
return true;
|
|
|
}
|