Warn admin's that the TagsMap module requires the tags module.
This commit is contained in:
parent
3b5b2f694a
commit
8178e7abaf
@ -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) {
|
static function admin_menu($menu, $theme) {
|
||||||
// Add a link to the TagsMap admin page to the Content menu.
|
// Add a link to the TagsMap admin page to the Content menu.
|
||||||
$menu->get("content_menu")
|
$menu->get("content_menu")
|
||||||
|
@ -43,6 +43,14 @@ class tagsmap_installer {
|
|||||||
site_status::clear("tagsmap_needs_tag");
|
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() {
|
static function uninstall() {
|
||||||
// Delete the GPS table before uninstalling.
|
// Delete the GPS table before uninstalling.
|
||||||
$db = Database::instance();
|
$db = Database::instance();
|
||||||
|
@ -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) {
|
static function admin_menu($menu, $theme) {
|
||||||
// Add a link to the TagsMap admin page to the Content menu.
|
// Add a link to the TagsMap admin page to the Content menu.
|
||||||
$menu->get("content_menu")
|
$menu->get("content_menu")
|
||||||
|
@ -43,6 +43,14 @@ class tagsmap_installer {
|
|||||||
site_status::clear("tagsmap_needs_tag");
|
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() {
|
static function uninstall() {
|
||||||
// Delete the GPS table before uninstalling.
|
// Delete the GPS table before uninstalling.
|
||||||
$db = Database::instance();
|
$db = Database::instance();
|
||||||
|
Reference in New Issue
Block a user