fix: Also delete apex domain in regDeleteDomain()

This commit is contained in:
Miraty 2023-01-23 01:42:18 +01:00
parent 01e9881ce6
commit 23b2afe03e
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ function regDeleteDomain($domain) {
$content = file_get_contents($path);
if ($content === false)
output(500, 'Failed to read current registry file.');
$content = preg_replace('/^(?:[a-z0-9._-]+\.)' . preg_quote($domain, '/') . '[\t ]+.+$/Dm', '', $content);
$content = preg_replace('/^(?:[a-z0-9._-]+\.)?' . preg_quote($domain, '/') . '[\t ]+.+$/Dm', '', $content);
if (file_put_contents($path, $content) === false)
output(500, 'Failed to write new registry file.');