summaryrefslogtreecommitdiff
path: root/core/helpers/module.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2008-12-15 03:49:48 +0000
committerTim Almdal <tnalmdal@shaw.ca>2008-12-15 03:49:48 +0000
commitb2107c37344a6013cedfcbff824accebd99c6112 (patch)
treec635234d22e594954ab37ffb794145d3d4dddb10 /core/helpers/module.php
parent119344d9db9873918995886af938f968cd21b922 (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/module.php')
-rw-r--r--core/helpers/module.php8
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");
}