Skip to content

Commit f104455

Browse files
committed
Edit dkim TXT records with the DKIM form
1 parent ef555bf commit f104455

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

interface/web/dns/dns_dkim_edit.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,15 @@ function onShowNew() {
7272
parent::onShowNew();
7373
}
7474

75+
function onShowEnd() {
76+
global $app, $conf;
77+
78+
$app->tpl->setVar("selector", str_replace('._domainkey', '', $this->dataRecord['name']), true);
79+
$app->tpl->setVar("public_key", str_replace('v=DKIM1; t=s; p=', '', $this->dataRecord['data']), true);
80+
81+
parent::onShowEnd();
82+
}
83+
7584
function onSubmit() {
7685
global $app, $conf;
7786

interface/web/dns/dns_txt_edit.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ function onLoad() {
5757
if ('v=spf1' === mb_substr($this->dataRecord['data'], 0, 6)) {
5858
header(sprintf('Location: dns_spf_edit.php?id=%d', $this->dataRecord['id']));
5959
exit;
60+
} elseif ("v=DKIM1; t=s; p=" === mb_substr($this->dataRecord["data"], 0, 16)) {
61+
header(sprintf("Location: dns_dkim_edit.php?id=%d", $this->dataRecord["id"]));
62+
exit;
6063
}
6164
}
6265
}

0 commit comments

Comments
 (0)