From b0a1cc4ca5fc5d3811c86d238a0f08600a86604d Mon Sep 17 00:00:00 2001 From: pedro_morgan <pedro_morgan@ispconfig3> Date: Sun, 19 Aug 2007 22:25:07 -0400 Subject: [PATCH] Added the mysql database to use --- interface/web/sites/web_domain_edit.php | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/interface/web/sites/web_domain_edit.php b/interface/web/sites/web_domain_edit.php index f925bd2..cb3d57e 100644 --- a/interface/web/sites/web_domain_edit.php +++ b/interface/web/sites/web_domain_edit.php @@ -250,6 +250,24 @@ } + function onAfterDelete() { + global $app, $conf; + + // Delete the sub and alias domains + $child_domains = $app->db->queryAllRecords("SELECT * FROM web_domain WHERE parent_domain_id = ".$this->id); + foreach($child_domains as $d) { + // Saving record to datalog when db_history enabled + if($app->tform->formDef["db_history"] == 'yes') { + $app->tform->datalogSave('DELETE',$d["domain_id"],$d,array()); + } + + $app->db->query("DELETE FROM web_domain WHERE domain_id = ".$d["domain_id"]." LIMIT 0,1"); + } + unset($child_domains); + unset($d); + + } + } $page = new page_action; -- Gitblit v1.9.1