1
0

Warn that MetaDescription requires the Tags module.

This commit is contained in:
rWatcher 2011-06-07 14:06:15 -04:00
parent c2ae530e45
commit 44e74e7321
4 changed files with 28 additions and 0 deletions

View File

@ -31,4 +31,10 @@ class metadescription_event_Core {
site_status::clear("metadescription_needs_tag");
}
}
static function pre_deactivate($data) {
if ($data->module == "tag") {
$data->messages["warn"][] = t("The MetaDescription module requires the Tags module.");
}
}
}

View File

@ -28,6 +28,14 @@ class metadescription_installer {
site_status::clear("metadescription_needs_tag");
}
static function can_activate() {
$messages = array();
if (!module::is_active("tag")) {
$messages["warn"][] = t("The MetaDescription module requires the Tags module.");
}
return $messages;
}
static function uninstall() {
module::delete("metadescription");
}

View File

@ -31,4 +31,10 @@ class metadescription_event_Core {
site_status::clear("metadescription_needs_tag");
}
}
static function pre_deactivate($data) {
if ($data->module == "tag") {
$data->messages["warn"][] = t("The MetaDescription module requires the Tags module.");
}
}
}

View File

@ -28,6 +28,14 @@ class metadescription_installer {
site_status::clear("metadescription_needs_tag");
}
static function can_activate() {
$messages = array();
if (!module::is_active("tag")) {
$messages["warn"][] = t("The MetaDescription module requires the Tags module.");
}
return $messages;
}
static function uninstall() {
module::delete("metadescription");
}