From 10f5fd22caedf03c257f1e23ea4bf4ee0f9a57c6 Mon Sep 17 00:00:00 2001 From: rWatcher Date: Sat, 25 Jul 2009 00:34:05 -0400 Subject: [PATCH] Require Tags module. --- modules/tagsmap/helpers/tagsmap_event.php | 32 +++++++++++++++++++ modules/tagsmap/helpers/tagsmap_installer.php | 4 +++ 2 files changed, 36 insertions(+) create mode 100644 modules/tagsmap/helpers/tagsmap_event.php diff --git a/modules/tagsmap/helpers/tagsmap_event.php b/modules/tagsmap/helpers/tagsmap_event.php new file mode 100644 index 00000000..c752993b --- /dev/null +++ b/modules/tagsmap/helpers/tagsmap_event.php @@ -0,0 +1,32 @@ +deactivate)) { + site_status::warning( + t("The TagsMap module requires the Tags module. " . + "Activate the Tags module now", + array("url" => url::site("admin/modules"))), + "tagsmap_needs_tag"); + } else { + site_status::clear("tagsmap_needs_tag"); + } + } +} \ No newline at end of file diff --git a/modules/tagsmap/helpers/tagsmap_installer.php b/modules/tagsmap/helpers/tagsmap_installer.php index f984f7c9..8a46def5 100644 --- a/modules/tagsmap/helpers/tagsmap_installer.php +++ b/modules/tagsmap/helpers/tagsmap_installer.php @@ -34,6 +34,10 @@ class tagsmap_installer { module::set_version("tagsmap", 1); } + static function deactivate() { + site_status::clear("tagsmap_needs_tag"); + } + static function uninstall() { $db = Database::instance(); $db->query("DROP TABLE IF EXISTS {tags_gpses};");