diff --git a/3.0/modules/minislideshow/helpers/minislideshow_event.php b/3.0/modules/minislideshow/helpers/minislideshow_event.php index 6d88569a..a4f76361 100644 --- a/3.0/modules/minislideshow/helpers/minislideshow_event.php +++ b/3.0/modules/minislideshow/helpers/minislideshow_event.php @@ -41,6 +41,12 @@ class minislideshow_event_Core { } } + static function pre_deactivate($data) { + if ($data->module == "rss") { + $data->messages["warn"][] = t("The MiniSlide Show module requires the RSS module."); + } + } + static function album_menu($menu, $theme) { // Add an option to access the slideshow from the album view. $menu diff --git a/3.0/modules/minislideshow/helpers/minislideshow_installer.php b/3.0/modules/minislideshow/helpers/minislideshow_installer.php index da071844..3edcf98a 100644 --- a/3.0/modules/minislideshow/helpers/minislideshow_installer.php +++ b/3.0/modules/minislideshow/helpers/minislideshow_installer.php @@ -22,4 +22,12 @@ class minislideshow_installer { static function deactivate() { site_status::clear("minislideshow_needs_rss"); } + + static function can_activate() { + $messages = array(); + if (!module::is_active("rss")) { + $messages["warn"][] = t("The MiniSlide Show module requires the RSS module."); + } + return $messages; + } } diff --git a/3.1/modules/minislideshow/helpers/minislideshow_event.php b/3.1/modules/minislideshow/helpers/minislideshow_event.php index 6d88569a..a4f76361 100644 --- a/3.1/modules/minislideshow/helpers/minislideshow_event.php +++ b/3.1/modules/minislideshow/helpers/minislideshow_event.php @@ -41,6 +41,12 @@ class minislideshow_event_Core { } } + static function pre_deactivate($data) { + if ($data->module == "rss") { + $data->messages["warn"][] = t("The MiniSlide Show module requires the RSS module."); + } + } + static function album_menu($menu, $theme) { // Add an option to access the slideshow from the album view. $menu diff --git a/3.1/modules/minislideshow/helpers/minislideshow_installer.php b/3.1/modules/minislideshow/helpers/minislideshow_installer.php index da071844..3edcf98a 100644 --- a/3.1/modules/minislideshow/helpers/minislideshow_installer.php +++ b/3.1/modules/minislideshow/helpers/minislideshow_installer.php @@ -22,4 +22,12 @@ class minislideshow_installer { static function deactivate() { site_status::clear("minislideshow_needs_rss"); } + + static function can_activate() { + $messages = array(); + if (!module::is_active("rss")) { + $messages["warn"][] = t("The MiniSlide Show module requires the RSS module."); + } + return $messages; + } }