1
0

Warn admin's that the TagsMap module requires the tags module.

This commit is contained in:
rWatcher 2011-06-07 11:53:49 -04:00
parent 3b5b2f694a
commit 8178e7abaf
4 changed files with 28 additions and 0 deletions

View File

@ -32,6 +32,12 @@ class tagsmap_event_Core {
}
}
static function pre_deactivate($data) {
if ($data->module == "tag") {
$data->messages["warn"][] = t("The TagsMap module requires the Tags module.");
}
}
static function admin_menu($menu, $theme) {
// Add a link to the TagsMap admin page to the Content menu.
$menu->get("content_menu")

View File

@ -43,6 +43,14 @@ class tagsmap_installer {
site_status::clear("tagsmap_needs_tag");
}
static function can_activate() {
$messages = array();
if (!module::is_active("tag")) {
$messages["warn"][] = t("The TagsMap module requires the Tags module.");
}
return $messages;
}
static function uninstall() {
// Delete the GPS table before uninstalling.
$db = Database::instance();

View File

@ -32,6 +32,12 @@ class tagsmap_event_Core {
}
}
static function pre_deactivate($data) {
if ($data->module == "tag") {
$data->messages["warn"][] = t("The TagsMap module requires the Tags module.");
}
}
static function admin_menu($menu, $theme) {
// Add a link to the TagsMap admin page to the Content menu.
$menu->get("content_menu")

View File

@ -43,6 +43,14 @@ class tagsmap_installer {
site_status::clear("tagsmap_needs_tag");
}
static function can_activate() {
$messages = array();
if (!module::is_active("tag")) {
$messages["warn"][] = t("The TagsMap module requires the Tags module.");
}
return $messages;
}
static function uninstall() {
// Delete the GPS table before uninstalling.
$db = Database::instance();