Skip to content

Commit

Permalink
Read runtime configuration when showing MX records information
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Lomakin committed Aug 21, 2017
1 parent 3cb6a71 commit ebd9172
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plib/library/Form/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,10 @@ public function __construct($options)
// Show current MX servers as users who use external DNS service and bought a license key and tried to
// setup DNS records cannot know what MX records should be set.
foreach (['1' => 'Primary MX', '2' => 'Secondary MX', '3' => 'Tertiary MX', '4' => 'Quaternary MX' ] as $idx => $label) {
$mxHostname = $this->getSetting(constant("self::OPTION_SPAMFILTER_MX{$idx}"));
$fieldName = constant("self::OPTION_SPAMFILTER_MX{$idx}");
$mxHostname = self::getRuntimeConfigOption($fieldName);
if (!empty($mxHostname)) {
$this->addElement('SimpleText', constant("self::OPTION_SPAMFILTER_MX{$idx}"), [
$this->addElement('SimpleText', $fieldName, [
'label' => $label,
'value' => $mxHostname,
]);
Expand Down

0 comments on commit ebd9172

Please sign in to comment.