aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/classes/ElggPlugin.php8
-rw-r--r--mod/categories/manifest.xml4
-rw-r--r--mod/categories/start.php6
3 files changed, 10 insertions, 8 deletions
diff --git a/engine/classes/ElggPlugin.php b/engine/classes/ElggPlugin.php
index 5ecdfdfd0..18d97d23a 100644
--- a/engine/classes/ElggPlugin.php
+++ b/engine/classes/ElggPlugin.php
@@ -648,9 +648,9 @@ class ElggPlugin extends ElggObject {
if (!is_callable($function)) {
$return = false;
} else {
- $on_enable = call_user_func($function);
+ $result = call_user_func($function);
// allow null to mean "I don't care" like other subsystems
- $return = ($on_disable === false) ? false: true;
+ $return = ($result === false) ? false: true;
}
if ($return === false) {
@@ -702,9 +702,9 @@ class ElggPlugin extends ElggObject {
if (!is_callable($function)) {
$return = false;
} else {
- $on_enable = call_user_func($function);
+ $result = call_user_func($function);
// allow null to mean "I don't care" like other subsystems
- $return = ($on_disable === false) ? false : true;
+ $return = ($result === false) ? false : true;
}
if ($return === false) {
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');
}