diff options
| author | Nathan Kinkade <nkinkade@nkinka.de> | 2010-07-08 00:29:37 +0000 |
|---|---|---|
| committer | Nathan Kinkade <nkinkade@nkinka.de> | 2010-07-08 00:29:37 +0000 |
| commit | c83650d83ad8b1f4bda30cac2ae8efa6e1c97287 (patch) | |
| tree | 482cf980e87cd7c80c28a89bb9395eba6b53026f /modules/organize/helpers/organize_event.php | |
| parent | a0b0b415515bff5f9edd43d373e8e78f3b3f8e4d (diff) | |
| parent | 9d66783f47636153bf3661d1d89e694dd5188c36 (diff) | |
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/organize/helpers/organize_event.php')
| -rw-r--r-- | modules/organize/helpers/organize_event.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/modules/organize/helpers/organize_event.php b/modules/organize/helpers/organize_event.php index a9d64637..ae05fb5d 100644 --- a/modules/organize/helpers/organize_event.php +++ b/modules/organize/helpers/organize_event.php @@ -42,4 +42,22 @@ class organize_event_Core { } } + static function pre_deactivate($data) { + if ($data->module == "rest") { + $data->messages["warn"][] = t("The Organize module requires the Rest module."); + } + } + + static function module_change($changes) { + if (!module::is_active("rest") || in_array("rest", $changes->deactivate)) { + site_status::warning( + t("The Organize module requires the Rest module. " . + "<a href=\"%url\">Activate the Rest module now</a>", + array("url" => html::mark_clean(url::site("admin/modules")))), + "organize_needs_rest"); + } else { + site_status::clear("organize_needs_rest"); + } + } + } |
