improve extendability
Cette révision appartient à :
Parent
f7f9c28b53
révision
ba97743b3e
@ -44,7 +44,18 @@ class SmtpChecker extends AdminDetailsController
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
/** @var Shop $activeShop */
|
||||
$this->setSmtpCredentials();
|
||||
$this->from = Registry::getRequest()->getRequestEscapedParameter('from') ?: '';
|
||||
$this->addTplParam('from', $this->from);
|
||||
$this->to = Registry::getRequest()->getRequestEscapedParameter('to') ?: '';
|
||||
$this->addTplParam('recipient', $this->to);
|
||||
$this->addTplParam('sendMail', Registry::getRequest()->getRequestEscapedParameter('sendmail'));
|
||||
|
||||
$this->addTplParam('smtpLog', $this->log);
|
||||
}
|
||||
|
||||
protected function setSmtpCredentials(): void
|
||||
{
|
||||
$activeShop = Registry::getConfig()->getActiveShop();
|
||||
|
||||
if ($localHost = Registry::getRequest()->getRequestEscapedParameter('smtpHost')) {
|
||||
@ -60,13 +71,6 @@ class SmtpChecker extends AdminDetailsController
|
||||
$this->addTplParam('smtpUser', $this->user);
|
||||
$this->pwd = Registry::getRequest()->getRequestEscapedParameter('smtpPwd') ?: $activeShop->getFieldData('oxsmtppwd');
|
||||
$this->addTplParam('smtpPwd', $this->pwd);
|
||||
$this->from = Registry::getRequest()->getRequestEscapedParameter('from') ?: '';
|
||||
$this->addTplParam('from', $this->from);
|
||||
$this->to = Registry::getRequest()->getRequestEscapedParameter('to') ?: '';
|
||||
$this->addTplParam('recipient', $this->to);
|
||||
$this->addTplParam('sendMail', Registry::getRequest()->getRequestEscapedParameter('sendmail'));
|
||||
|
||||
$this->addTplParam('smtpLog', $this->log);
|
||||
}
|
||||
|
||||
public function getTemplateName(): string
|
||||
|
Chargement…
Référencer dans un nouveau ticket
Block a user