improve code

This commit is contained in:
2023-12-12 11:43:46 +01:00
parent 0dbd956a68
commit d6a2373c31
5 changed files with 18 additions and 11 deletions

View File

@ -52,9 +52,9 @@ class SmtpChecker extends AdminDetailsController
list( 'host' => $shopHost, 'port' => $shopPort ) = parse_url( trim($activeShop->getFieldData( 'oxsmtp' )) );
}
$this->host = $shopHost ?? null;
$this->host = $shopHost;
$this->addTplParam('smtpHost', Registry::getRequest()->getRequestEscapedParameter('smtpHost'));
$this->port = $shopPort ?? null;
$this->port = $shopPort;
$this->user = Registry::getRequest()->getRequestEscapedParameter('smtpUser') ?: $activeShop->getFieldData('oxsmtpuser');
$this->addTplParam('smtpUser', $this->user);
$this->pwd = Registry::getRequest()->getRequestEscapedParameter('smtpPwd') ?: $activeShop->getFieldData('oxsmtppwd');
@ -82,6 +82,7 @@ class SmtpChecker extends AdminDetailsController
public function getMailAddressList()
{
/** @var Shop $shop */
$shop = Registry::getConfig()->getActiveShop();
return array_filter(