From b2107c37344a6013cedfcbff824accebd99c6112 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Mon, 15 Dec 2008 03:49:48 +0000 Subject: 1) Move the deletion of the vars into module::delete helper 2) remove the watermark_add_form.html.php --- core/helpers/module.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'core/helpers/module.php') diff --git a/core/helpers/module.php b/core/helpers/module.php index a06f2999..04c4cc07 100644 --- a/core/helpers/module.php +++ b/core/helpers/module.php @@ -46,7 +46,13 @@ class module_Core { } public static function delete ($module_name) { - ORM::factory("module")->where("name", $module_name)->find()->delete(); + $module = ORM::factory("module")->where("name", $module_name)->find(); + $module_id = $module->id; + $module->delete(); + + $db = Database::instance(); + $db->query("DELETE FROM vars WHERE module_id = '{$module->id}';"); + Kohana::log("debug", "$module_name: module deleted"); } -- cgit v1.2.3