|
@@ -2,10 +2,6 @@
|
|
|
|
|
|
|
|
namespace ThurData\Servers\KerioEmail\App\UI\Client\DomainAlias\Providers;
|
|
namespace ThurData\Servers\KerioEmail\App\UI\Client\DomainAlias\Providers;
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-use ThurData\Servers\KerioEmail\App\Helpers\KerioManager;
|
|
|
|
|
-use ThurData\Servers\KerioEmail\App\Libs\Product\ProductManager;
|
|
|
|
|
-use ThurData\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Services\Delete\DeleteDomainAlias;
|
|
|
|
|
use ThurData\Servers\KerioEmail\Core\UI\ResponseTemplates\HtmlDataJsonResponse;
|
|
use ThurData\Servers\KerioEmail\Core\UI\ResponseTemplates\HtmlDataJsonResponse;
|
|
|
use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\DataProviders\BaseDataProvider;
|
|
use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\DataProviders\BaseDataProvider;
|
|
|
use ThurData\Servers\KerioEmail\Api\KerioWhmcs;
|
|
use ThurData\Servers\KerioEmail\Api\KerioWhmcs;
|
|
@@ -42,11 +38,7 @@ class DeleteDomainAliasProvider extends BaseDataProvider
|
|
|
*/
|
|
*/
|
|
|
public function delete()
|
|
public function delete()
|
|
|
{
|
|
{
|
|
|
- /**
|
|
|
|
|
- * hosting id
|
|
|
|
|
- */
|
|
|
|
|
- $hid = $this->request->get('id');
|
|
|
|
|
-
|
|
|
|
|
|
|
+ $maildomain = $this->getWhmcsParamByKey('domain');
|
|
|
$api = new KerioWhmcs('whmcsKerioEmail', 'Thurdata', '1.0');
|
|
$api = new KerioWhmcs('whmcsKerioEmail', 'Thurdata', '1.0');
|
|
|
try {
|
|
try {
|
|
|
$api->login($this->getWhmcsParamByKey('serverhostname'), $this->getWhmcsParamByKey('serverusername'), $this->getWhmcsParamByKey('serverpassword'));
|
|
$api->login($this->getWhmcsParamByKey('serverhostname'), $this->getWhmcsParamByKey('serverusername'), $this->getWhmcsParamByKey('serverpassword'));
|
|
@@ -62,9 +54,8 @@ class DeleteDomainAliasProvider extends BaseDataProvider
|
|
|
return ['error' => $error->getMessage()];
|
|
return ['error' => $error->getMessage()];
|
|
|
}
|
|
}
|
|
|
foreach($domains as $domain) {
|
|
foreach($domains as $domain) {
|
|
|
- if(($domain['name']) === $this->getWhmcsParamByKey('domain')){
|
|
|
|
|
|
|
+ if($domain['name'] === $maildomain){
|
|
|
$domainID = $domain['id'];
|
|
$domainID = $domain['id'];
|
|
|
- $domainName = $domain['name'];
|
|
|
|
|
$aliasList = $domain['aliasList'];
|
|
$aliasList = $domain['aliasList'];
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -91,9 +82,7 @@ class DeleteDomainAliasProvider extends BaseDataProvider
|
|
|
public function massDelete()
|
|
public function massDelete()
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
- *
|
|
|
|
|
- */
|
|
|
|
|
|
|
+ $maildomain = $this->getWhmcsParamByKey('domain');
|
|
|
$api = new KerioWhmcs('whmcsKerioEmail', 'Thurdata', '1.0');
|
|
$api = new KerioWhmcs('whmcsKerioEmail', 'Thurdata', '1.0');
|
|
|
try {
|
|
try {
|
|
|
$api->login($this->getWhmcsParamByKey('serverhostname'), $this->getWhmcsParamByKey('serverusername'), $this->getWhmcsParamByKey('serverpassword'));
|
|
$api->login($this->getWhmcsParamByKey('serverhostname'), $this->getWhmcsParamByKey('serverusername'), $this->getWhmcsParamByKey('serverpassword'));
|
|
@@ -109,9 +98,8 @@ class DeleteDomainAliasProvider extends BaseDataProvider
|
|
|
return ['error' => $error->getMessage()];
|
|
return ['error' => $error->getMessage()];
|
|
|
}
|
|
}
|
|
|
foreach($domains as $domain) {
|
|
foreach($domains as $domain) {
|
|
|
- if(($domain['name']) === $this->getWhmcsParamByKey('domain')){
|
|
|
|
|
|
|
+ if($domain['name'] === $maildomain){
|
|
|
$domainID = $domain['id'];
|
|
$domainID = $domain['id'];
|
|
|
- $domainName = $domain['name'];
|
|
|
|
|
$aliasList = $domain['aliasList'];
|
|
$aliasList = $domain['aliasList'];
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|