aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-27 22:48:42 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-27 22:48:42 +0000
commitd1b4235b5dd26559334a7b57dcf9e53a3042e354 (patch)
tree929400f35b00c2e25096cb350c25e02a53ed06f6 /mod
parentf61076fec0c1cfdee089f89c10cb46b7d195f9c7 (diff)
downloadelgg-d1b4235b5dd26559334a7b57dcf9e53a3042e354.tar.gz
elgg-d1b4235b5dd26559334a7b57dcf9e53a3042e354.tar.bz2
Fixes #3011. on_activate and on_deactivate work for plugins now. Updated the categories plugin to use it.
git-svn-id: http://code.elgg.org/elgg/trunk@8507 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
-rw-r--r--mod/categories/manifest.xml4
-rw-r--r--mod/categories/start.php6
2 files changed, 6 insertions, 4 deletions
diff --git a/mod/categories/manifest.xml b/mod/categories/manifest.xml
index 89c7d452b..9b004c1d2 100644
--- a/mod/categories/manifest.xml
+++ b/mod/categories/manifest.xml
@@ -13,6 +13,6 @@
<version>2010030101</version>
</requires>
<admin_interface>advanced</admin_interface>
- <on_enable>categories_on_enable</on_enable>
- <on_disable>categories_on_disable</on_disable>
+ <on_activate>categories_on_activate</on_activate>
+ <on_deactivate>categories_on_deactivate</on_deactivate>
</plugin_manifest>
diff --git a/mod/categories/start.php b/mod/categories/start.php
index bc272274f..9ff729b25 100644
--- a/mod/categories/start.php
+++ b/mod/categories/start.php
@@ -58,7 +58,9 @@ function categories_save($event, $object_type, $object) {
/**
* Add a reminder to set default categories.
*/
-function categories_on_enable() {
+function categories_on_activate() {
+ $site = elgg_get_site_entity();
+
if (!$site->categories) {
$url = elgg_normalize_url('pg/admin/plugin_settings/categories');
$message = elgg_echo('categories:on_enable_reminder', array($url));
@@ -70,6 +72,6 @@ function categories_on_enable() {
/**
* Clean up admin notices on disable.
*/
-function categories_on_disable() {
+function categories_on_deactivate() {
elgg_delete_admin_notice('categories_admin_notice_no_categories');
}