From 18dc9971fa3c8d111a547fac0d372679431a7762 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Mon, 30 Jul 2007 08:59:48 -0400
Subject: [PATCH] Rename of old dns module

---
 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