Explorar o código

fix: Also delete apex domain in regDeleteDomain()

Miraty %!s(int64=2) %!d(string=hai) anos
pai
achega
23b2afe03e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      fn/reg.php

+ 1 - 1
fn/reg.php

@@ -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.');