improve extendability
This commit is contained in:
bovenliggende
f7f9c28b53
commit
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
|
||||
|
Laden…
Verwijs in nieuw issue
Block a user