diff --git a/public/ns/zone.php b/public/ns/zone.php index 9ae64dc..14868b4 100644 --- a/public/ns/zone.php +++ b/public/ns/zone.php @@ -63,17 +63,17 @@ if (isset($_POST['zone']) AND isset($_SESSION['username'])) { nsCheckZonePossession($_POST['zone']); - // Remove Knot zone file - unlink(KNOT_ZONES_PATH . "/" . $_POST['zone'] . "zone"); - - // Remove Knot tied data - exec(KNOTC_PATH . " zone-purge" . $_POST['zone']); - // Remove from Knot configuration exec(KNOTC_PATH . " conf-begin"); exec(KNOTC_PATH . " conf-unset 'zone[" . $_POST['zone'] . "]'"); exec(KNOTC_PATH . " conf-commit"); + // Remove Knot zone file + unlink(KNOT_ZONES_PATH . "/" . $_POST['zone'] . "zone"); + + // Remove Knot related data + exec(KNOTC_PATH . " zone-purge " . $_POST['zone']); + // Remove from Niver's database $db = new PDO('sqlite:' . DB_PATH); $stmt = $db->prepare("DELETE FROM zones WHERE zone = :zone AND username = :username");