diff --git a/src/library/Registrar/Adapter/Internetbs.php b/src/library/Registrar/Adapter/Internetbs.php index ba1001e9b..9ded36242 100644 --- a/src/library/Registrar/Adapter/Internetbs.php +++ b/src/library/Registrar/Adapter/Internetbs.php @@ -166,7 +166,7 @@ class Registrar_Adapter_Internetbs extends Registrar_AdapterAbstract if ($result['status'] == 'SUCCESS'){ return $this->_createDomainObj($result, $domain); } else { - $placeholders = ['action' => __trans('get domain details'), 'type' => 'Internetbs']; + $placeholders = [':action:' => __trans('get domain details'), ':type:' => 'Internetbs']; throw new Registrar_Exception('Failed to :action: with the :type: registrar, check the error logs for further details', $placeholders); } } diff --git a/src/library/Registrar/Adapter/Namecheap.php b/src/library/Registrar/Adapter/Namecheap.php index 3b1acf082..9d229a2de 100644 --- a/src/library/Registrar/Adapter/Namecheap.php +++ b/src/library/Registrar/Adapter/Namecheap.php @@ -167,13 +167,13 @@ class Registrar_Adapter_Namecheap extends Registrar_AdapterAbstract if (isset($result['status']) && strtolower($result['status']) == 'error') { error_log("Namecheap error: " . PHP_EOL . $result['error']); - $placeholders = ['action' => $params['Command'], 'type' => 'Namecheap']; + $placeholders = [':action:' => $params['Command'], ':type:' => 'Namecheap']; throw new Registrar_Exception('Failed to :action: with the :type: registrar, check the error logs for further details', $placeholders); } if (isset($result['status']) && strtolower($result['status']) == 'failed') { error_log("Namecheap error: " . PHP_EOL . $result['actionstatusdesc']); - $placeholders = ['action' => $params['Command'], 'type' => 'Namecheap']; + $placeholders = [':action:' => $params['Command'], ':type:' => 'Namecheap']; throw new Registrar_Exception('Failed to :action: with the :type: registrar, check the error logs for further details', $placeholders); } @@ -244,7 +244,7 @@ class Registrar_Adapter_Namecheap extends Registrar_AdapterAbstract // problem here: FOSSBilling doesn't display our error and will display 'nameservers updates' evern when this fails if (!isset($result->CommandResponse->DomainDNSSetCustomResult['Updated']) && $result->CommandResponse->DomainDNSSetCustomResult['Updated'] != 'true') { - $placeholders = ['action' => __trans('update nameservers'), 'type' => 'Namecheap']; + $placeholders = [':action:' => __trans('update nameservers'), ':type:' => 'Namecheap']; throw new Registrar_Exception('Failed to :action: with the :type: registrar, check the error logs for further details', $placeholders); } return True; @@ -341,7 +341,7 @@ class Registrar_Adapter_Namecheap extends Registrar_AdapterAbstract $result = $this->_makeRequest($params); if (!isset($result->CommandResponse->DomainContactsResult)) { - $placeholders = ['action' => __trans('retrieve domain details'), 'type' => 'Namecheap']; + $placeholders = [':action:' => __trans('retrieve domain details'), ':type:' => 'Namecheap']; throw new Registrar_Exception('Failed to :action: with the :type: registrar, check the error logs for further details', $placeholders); } @@ -586,7 +586,7 @@ class Registrar_Adapter_Namecheap extends Registrar_AdapterAbstract 'id' => (string)$result->CommandResponse->DomainGetInfoResult->Whoisguard->ID ); } - $placeholders = ['action' => __trans('retrieve privacy information'), 'type' => 'Namecheap']; + $placeholders = [':action:' => __trans('retrieve privacy information'), ':type:' => 'Namecheap']; throw new Registrar_Exception('Failed to :action: with the :type: registrar, check the error logs for further details', $placeholders); } @@ -649,7 +649,7 @@ class Registrar_Adapter_Namecheap extends Registrar_AdapterAbstract ); $result = $this->_makeRequest($params); if (!isset($result->CommandResponse->DomainGetRegistrarLockResult['RegistrarLockStatus'])) { - $placeholders = ['action' => __trans('get the domain lock status'), 'type' => 'Namecheap']; + $placeholders = [':action:' => __trans('get the domain lock status'), ':type:' => 'Namecheap']; throw new Registrar_Exception('Failed to :action: with the :type: registrar, check the error logs for further details', $placeholders); } return $result->CommandResponse->DomainGetRegistrarLockResult['RegistrarLockStatus'] == 'true'; @@ -673,7 +673,7 @@ class Registrar_Adapter_Namecheap extends Registrar_AdapterAbstract $result = $this->_makeRequest($params); if (!isset($result->CommandResponse->DomainSetRegistrarLockResult['IsSuccess'])) { - $placeholders = ['action' => __trans('set the domain lock status'), 'type' => 'Namecheap']; + $placeholders = [':action:' => __trans('set the domain lock status'), ':type:' => 'Namecheap']; throw new Registrar_Exception('Failed to :action: with the :type: registrar, check the error logs for further details', $placeholders); } if ($result->CommandResponse->DomainGetRegistrarLockResult['IsSuccess'] == 'true') { @@ -701,7 +701,7 @@ class Registrar_Adapter_Namecheap extends Registrar_AdapterAbstract $result = $this->_makeRequest($params); if (!isset($result->CommandResponse->DomainSetRegistrarLockResult['IsSuccess'])) { - $placeholders = ['action' => __trans('set the domain lock status'), 'type' => 'Namecheap']; + $placeholders = [':action:' => __trans('set the domain lock status'), ':type:' => 'Namecheap']; throw new Registrar_Exception('Failed to :action: with the :type: registrar, check the error logs for further details', $placeholders); } if ($result->CommandResponse->DomainGetRegistrarLockResult['IsSuccess'] == 'true') { diff --git a/src/library/Registrar/Adapter/Resellerclub.php b/src/library/Registrar/Adapter/Resellerclub.php index 57f330c99..a9593b3be 100644 --- a/src/library/Registrar/Adapter/Resellerclub.php +++ b/src/library/Registrar/Adapter/Resellerclub.php @@ -395,7 +395,7 @@ class Registrar_Adapter_Resellerclub extends Registrar_AdapterAbstract ); $data = $this->_makeRequest('domains/details', $params); if(!isset($data['domsecret'])) { - $placeholders = ['action' => __trans('get the transfer code'), 'type' => 'ResellerClub']; + $placeholders = [':action:' => __trans('get the transfer code'), ':type:' => 'ResellerClub']; throw new Registrar_Exception('Failed to :action: with the :type: registrar, check the error logs for further details', $placeholders); } return $data['domsecret']; @@ -701,19 +701,19 @@ class Registrar_Adapter_Resellerclub extends Registrar_AdapterAbstract if(isset($json['status']) && $json['status'] == 'ERROR') { error_log("ResellerClub error: " . $json['message']); - $placeholders = ['action' => $url, 'type' => 'ResellerClub']; + $placeholders = [':action:' => $url, ':type:' => 'ResellerClub']; throw new Registrar_Exception('Failed to :action: with the :type: registrar, check the error logs for further details', $placeholders); } if(isset($json['status']) && $json['status'] == 'error') { error_log("ResellerClub error: " . $json['error']); - $placeholders = ['action' => $url, 'type' => 'ResellerClub']; + $placeholders = [':action"' => $url, ':type:' => 'ResellerClub']; throw new Registrar_Exception('Failed to :action: with the :type: registrar, check the error logs for further details', $placeholders); } if(isset($json['status']) && $json['status'] == 'Failed') { error_log("ResellerClub error: " . $json['actionstatusdesc']); - $placeholders = ['action' => $url, 'type' => 'ResellerClub']; + $placeholders = [':action:' => $url, ':type:' => 'ResellerClub']; throw new Registrar_Exception('Failed to :action: with the :type: registrar, check the error logs for further details', $placeholders); } diff --git a/src/library/Server/Manager/CWP.php b/src/library/Server/Manager/CWP.php index ef7f1662a..b9bd740fc 100644 --- a/src/library/Server/Manager/CWP.php +++ b/src/library/Server/Manager/CWP.php @@ -140,7 +140,7 @@ class Server_Manager_CWP extends Server_Manager if ($this->makeAPIRequest('account', $data)) { return true; } else { - $placeholders = ['action' => __trans('create account'), 'type' => 'CWP']; + $placeholders = [':action:' => __trans('create account'), ':type:' => 'CWP']; throw new Server_Exception('Failed to :action: on the :type: server, check the error logs for further details', $placeholders); } } @@ -174,7 +174,7 @@ class Server_Manager_CWP extends Server_Manager if ($this->makeAPIRequest('account', $data)) { return true; } else { - $placeholders = ['action' => __trans('unsuspend account'), 'type' => 'CWP']; + $placeholders = [':action:' => __trans('unsuspend account'), ':type:' => 'CWP']; throw new Server_Exception('Failed to :action: on the :type: server, check the error logs for further details', $placeholders); } } @@ -194,7 +194,7 @@ class Server_Manager_CWP extends Server_Manager if ($this->makeAPIRequest('account', $data)) { return true; } else { - $placeholders = ['action' => __trans('cancel account'), 'type' => 'CWP']; + $placeholders = [':action:' => __trans('cancel account'), ':type:' => 'CWP']; throw new Server_Exception('Failed to :action: on the :type: server, check the error logs for further details', $placeholders); } } @@ -214,7 +214,7 @@ class Server_Manager_CWP extends Server_Manager if ($this->makeAPIRequest('changepack', $data)) { return true; } else { - $placeholders = ['action' => __trans('change account package'), 'type' => 'CWP']; + $placeholders = [':action:' => __trans('change account package'), ':type:' => 'CWP']; throw new Server_Exception('Failed to :action: on the :type: server, check the error logs for further details', $placeholders); } } @@ -232,7 +232,7 @@ class Server_Manager_CWP extends Server_Manager if ($this->makeAPIRequest('changepass', $data)) { return true; } else { - $placeholders = ['action' => __trans('change account password'), 'type' => 'CWP']; + $placeholders = [':action:' => __trans('change account password'), ':type:' => 'CWP']; throw new Server_Exception('Failed to :action: on the :type: server, check the error logs for further details', $placeholders); } } diff --git a/src/library/Server/Manager/Directadmin.php b/src/library/Server/Manager/Directadmin.php index 04c65c1eb..f94ef5ea5 100644 --- a/src/library/Server/Manager/Directadmin.php +++ b/src/library/Server/Manager/Directadmin.php @@ -440,7 +440,7 @@ class Server_Manager_Directadmin extends Server_Manager $r = $this->_parseResponse($data); if(isset($r['error']) && $r['error'] == 1) { - $placeholders = ['action' => $command, 'type' => 'DirectAdmin']; + $placeholders = [':action:' => $command, ':type:' => 'DirectAdmin']; throw new Server_Exception('Failed to :action: on the :type: server, check the error logs for further details', $placeholders); } diff --git a/src/library/Server/Manager/Hestia.php b/src/library/Server/Manager/Hestia.php index 16d213f2c..a45a46cbd 100644 --- a/src/library/Server/Manager/Hestia.php +++ b/src/library/Server/Manager/Hestia.php @@ -195,7 +195,7 @@ class Server_Manager_Hestia extends Server_Manager ]; $result2 = $this->_makeRequest($postvars2); } else { - $placeholders = ['action' => __trans('create user'), 'type' => 'HestiaCP']; + $placeholders = [':action:' => __trans('create user'), ':type:' => 'HestiaCP']; throw new Server_Exception('Failed to :action: on the :type: server, check the error logs for further details', $placeholders); } if (0 !== intval($result2)) { @@ -206,10 +206,10 @@ class Server_Manager_Hestia extends Server_Manager ]; $result3 = $this->_makeRequest($postvars3); if (0 !== intval($result3)) { - $placeholders = ['action1' => __trans('delete domain'), 'action2' => __trans('create domain'), 'type' => 'HestiaCP']; + $placeholders = [':action1:' => __trans('delete domain'), ':action2:' => __trans('create domain'), ':type:' => 'HestiaCP']; throw new Server_Exception('Failed to :action1: on the :type: server after failed to :action2:, check the error logs for further details', $placeholders); } - $placeholders = ['action' => __trans('create domain'), 'type' => 'HestiaCP']; + $placeholders = [':action:' => __trans('create domain'), ':type:' => 'HestiaCP']; throw new Server_Exception('Failed to :action: on the :type: server, check the error logs for further details', $placeholders); } @@ -236,7 +236,7 @@ class Server_Manager_Hestia extends Server_Manager return true; } if (0 !== intval($result)) { - $placeholders = ['action' => __trans('suspend account'), 'type' => 'HestiaCP']; + $placeholders = [':action:' => __trans('suspend account'), ':type:' => 'HestiaCP']; throw new Server_Exception('Failed to :action: on the :type: server, check the error logs for further details', $placeholders); } @@ -261,7 +261,7 @@ class Server_Manager_Hestia extends Server_Manager $result = $this->_makeRequest($postvars); if (0 !== intval($result)) { - $placeholders = ['action' => __trans('unsuspend account'), 'type' => 'HestiaCP']; + $placeholders = [':action:' => __trans('unsuspend account'), ':type:' => 'HestiaCP']; throw new Server_Exception('Failed to :action: on the :type: server, check the error logs for further details', $placeholders); } @@ -290,7 +290,7 @@ class Server_Manager_Hestia extends Server_Manager if ('3' == intval($result)) { return true; } elseif (0 !== intval($result)) { - $placeholders = ['action' => __trans('cancel account'), 'type' => 'HestiaCP']; + $placeholders = [':action:' => __trans('cancel account'), ':type:' => 'HestiaCP']; throw new Server_Exception('Failed to :action: on the :type: server, check the error logs for further details', $placeholders); } @@ -320,7 +320,7 @@ class Server_Manager_Hestia extends Server_Manager // Make request and change package $result = $this->_makeRequest($postvars); if (0 !== intval($result)) { - $placeholders = ['action' => __trans('change account package'), 'type' => 'HestiaCP']; + $placeholders = [':action:' => __trans('change account package'), ':type:' => 'HestiaCP']; throw new Server_Exception('Failed to :action: on the :type: server, check the error logs for further details', $placeholders); } @@ -363,7 +363,7 @@ class Server_Manager_Hestia extends Server_Manager // Make request and change password $result = $this->_makeRequest($postvars); if (0 !== intval($result)) { - $placeholders = ['action' => __trans('change account password'), 'type' => 'HestiaCP']; + $placeholders = [':action:' => __trans('change account password'), ':type:' => 'HestiaCP']; throw new Server_Exception('Failed to :action: on the :type: server, check the error logs for further details', $placeholders); } diff --git a/src/library/Server/Manager/Plesk.php b/src/library/Server/Manager/Plesk.php index b1b1c2745..ae05fa74e 100644 --- a/src/library/Server/Manager/Plesk.php +++ b/src/library/Server/Manager/Plesk.php @@ -86,7 +86,7 @@ class Server_Manager_Plesk extends Server_Manager $id = $this->_createClient($a); $client = $a->getClient(); if (!$id) { - $placeholders = ['action' => __trans('create account'), 'type' => 'Plesk']; + $placeholders = [':action:' => __trans('create account'), ':type"' => 'Plesk']; throw new Server_Exception('Failed to :action: on the :type: server, check the error logs for further details', $placeholders); } else { $client->setId((string)$id); diff --git a/src/library/Server/Manager/Whm.php b/src/library/Server/Manager/Whm.php index c6db43103..df911bdfe 100644 --- a/src/library/Server/Manager/Whm.php +++ b/src/library/Server/Manager/Whm.php @@ -417,7 +417,7 @@ class Server_Manager_Whm extends Server_Manager $msg = sprintf('Function call "%s" response is invalid, body: %s', $action, $body); $this->getLog()->crit($msg); - $placeholders = ['action' => $action, 'type' => 'cPanel']; + $placeholders = [':action:' => $action, ':type:' => 'cPanel']; throw new Server_Exception('Failed to :action: on the :type: server, check the error logs for further details', $placeholders); } if(isset($json->cpanelresult) && isset($json->cpanelresult->error)) { @@ -427,17 +427,17 @@ class Server_Manager_Whm extends Server_Manager } if(isset($json->data) && isset($json->data->result) && $json->data->result == '0') { $this->getLog()->crit(sprintf('WHM server response error calling action %s: "%s"', $action, $json->data->reason)); - $placeholders = ['action' => $action, 'type' => 'cPanel']; + $placeholders = [':action:' => $action, ':type:' => 'cPanel']; throw new Server_Exception('Failed to :action: on the :type: server, check the error logs for further details', $placeholders); } if(isset($json->result) && is_array($json->result) && $json->result[0]->status == 0) { $this->getLog()->crit(sprintf('WHM server response error calling action %s: "%s"',$action, $json->result[0]->statusmsg)); - $placeholders = ['action' => $action, 'type' => 'cPanel']; + $placeholders = [':action:' => $action, ':type:' => 'cPanel']; throw new Server_Exception('Failed to :action: on the :type: server, check the error logs for further details', $placeholders); } if(isset($json->status) && $json->status != '1') { $this->getLog()->crit(sprintf('WHM server response error calling action %s: "%s"',$action, $json->statusmsg)); - $placeholders = ['action' => $action, 'type' => 'cPanel']; + $placeholders = [':action:' => $action, ':type:' => 'cPanel']; throw new Server_Exception('Failed to :action: on the :type: server, check the error logs for further details', $placeholders); }