From 3b52b31c5451bfb4edd92d3f4b0093e51ec2b027 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 12 May 2009 23:46:03 +0000 Subject: Use the module_change event to figure out if the rss module is inactive. If it is, we need to alert the admin user. --- modules/slideshow/helpers/slideshow_event.php | 32 +++++++++++++++++++++++ modules/slideshow/helpers/slideshow_installer.php | 1 + 2 files changed, 33 insertions(+) create mode 100644 modules/slideshow/helpers/slideshow_event.php (limited to 'modules/slideshow') diff --git a/modules/slideshow/helpers/slideshow_event.php b/modules/slideshow/helpers/slideshow_event.php new file mode 100644 index 00000000..088d7daa --- /dev/null +++ b/modules/slideshow/helpers/slideshow_event.php @@ -0,0 +1,32 @@ +uninstall)) { + site_status::warning( + t("The Slideshow module requires the RSS module. " . + "Install the RSS module now", + array("url" => url::site("admin/modules"))), + "slideshow_needs_rss"); + } else { + site_status::clear("slideshow_needs_rss"); + } + } +} diff --git a/modules/slideshow/helpers/slideshow_installer.php b/modules/slideshow/helpers/slideshow_installer.php index c62369ab..588f36ad 100644 --- a/modules/slideshow/helpers/slideshow_installer.php +++ b/modules/slideshow/helpers/slideshow_installer.php @@ -27,5 +27,6 @@ class slideshow_installer { static function uninstall() { module::delete("slideshow"); + site_status::clear("slideshow_needs_rss"); } } -- cgit v1.2.3