Change zone deletion steps order
This commit is contained in:
parent
af99877e51
commit
6a50bc07a7
1 changed files with 6 additions and 6 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue