diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2008-12-15 03:49:48 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2008-12-15 03:49:48 +0000 |
commit | b2107c37344a6013cedfcbff824accebd99c6112 (patch) | |
tree | c635234d22e594954ab37ffb794145d3d4dddb10 /core/helpers | |
parent | 119344d9db9873918995886af938f968cd21b922 (diff) |
1) Move the deletion of the vars into module::delete helper
2) remove the watermark_add_form.html.php
Diffstat (limited to 'core/helpers')
-rw-r--r-- | core/helpers/module.php | 8 |
1 files changed, 7 insertions, 1 deletions
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"); } |