From 1ba012db0e2b9b60899a666471326465bb7a9f93 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 9 Nov 2008 23:45:47 +0000 Subject: Chain away temporary variables --- modules/auth/helpers/auth_installer.php | 3 +-- modules/comment/helpers/comment_installer.php | 3 +-- modules/user/helpers/user_installer.php | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) (limited to 'modules') diff --git a/modules/auth/helpers/auth_installer.php b/modules/auth/helpers/auth_installer.php index f5c3ab95..ebd8712e 100644 --- a/modules/auth/helpers/auth_installer.php +++ b/modules/auth/helpers/auth_installer.php @@ -57,7 +57,6 @@ class auth_installer { public static function uninstall() { $db = Database::instance(); $db->query("DROP TABLE IF EXISTS `passwords`;"); - $auth_module = ORM::factory("module")->where("name", "auth")->find(); - $auth_module->delete(); + ORM::factory("module")->where("name", "auth")->find()->delete(); } } \ No newline at end of file diff --git a/modules/comment/helpers/comment_installer.php b/modules/comment/helpers/comment_installer.php index f128ed0b..7e47ce8f 100644 --- a/modules/comment/helpers/comment_installer.php +++ b/modules/comment/helpers/comment_installer.php @@ -54,7 +54,6 @@ class comment_installer { public static function uninstall() { $db = Database::instance(); $db->query("DROP TABLE IF EXISTS `comments`;"); - $comment_module = ORM::factory("module")->where("name", "comment")->find(); - $comment_module->delete(); + ORM::factory("module")->where("name", "comment")->find()->delete(); } } diff --git a/modules/user/helpers/user_installer.php b/modules/user/helpers/user_installer.php index 93f36d99..97206752 100644 --- a/modules/user/helpers/user_installer.php +++ b/modules/user/helpers/user_installer.php @@ -87,7 +87,6 @@ class user_installer { $db->query("DROP TABLE IF EXISTS `users`;"); $db->query("DROP TABLE IF EXISTS `groups`;"); $db->query("DROP TABLE IF EXISTS `groups_users`;"); - $user_module = ORM::factory("module")->where("name", "user")->find(); - $user_module->delete(); + ORM::factory("module")->where("name", "user")->find()->delete(); } } \ No newline at end of file -- cgit v1.2.3