From 7aed9239088b582a065da3fb63796ff66cd357c8 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 26 May 2009 05:28:59 +0000 Subject: Restructure the module lifecycle. Install: _installer::install() is called, any necessary tables are created. Activate: _installer::activate() is called. Module controllers are routable, helpers are accessible, etc. The module is in use. Deactivate: _installer::deactivate() is called. Module code is not accessible or routable. Module is *not* in use, but its tables are still around. Uninstall: _installer::uninstall() is called. Module is completely removed from the database. Admin > Modules will install and activate modules, but will only deactivate (will NOT uninstall modules). --- modules/recaptcha/helpers/recaptcha_installer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/recaptcha/helpers') diff --git a/modules/recaptcha/helpers/recaptcha_installer.php b/modules/recaptcha/helpers/recaptcha_installer.php index ccc27aae..6269c632 100644 --- a/modules/recaptcha/helpers/recaptcha_installer.php +++ b/modules/recaptcha/helpers/recaptcha_installer.php @@ -20,16 +20,16 @@ class recaptcha_installer { static function install() { $version = module::get_version("recaptcha"); - if ($version == 0) { module::set_version("recaptcha", 1); } + } + static function activate() { recaptcha::check_config(); } static function uninstall() { site_status::clear("recaptcha_config"); - module::delete("recaptcha"); } } -- cgit v1.2.3