diff options
author | Cash Costello <cash.costello@gmail.com> | 2011-11-06 07:55:11 -0500 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2011-11-06 07:55:11 -0500 |
commit | 2615252b460c01dd54170fed510516a1c50e3a42 (patch) | |
tree | da9a692379bd98a73dbee4e76f2fa479d80f1782 | |
parent | a7b3dfa29f185c1f154ec229ba448222d6d442af (diff) | |
download | elgg-2615252b460c01dd54170fed510516a1c50e3a42.tar.gz elgg-2615252b460c01dd54170fed510516a1c50e3a42.tar.bz2 |
Fixes #4067 adds activate/deactivate scripts
-rw-r--r-- | mod/blog/activate.php | 6 | ||||
-rw-r--r-- | mod/blog/deactivate.php | 6 | ||||
-rw-r--r-- | mod/search/README.txt | 5 | ||||
-rw-r--r-- | mod/thewire/activate.php | 6 | ||||
-rw-r--r-- | mod/thewire/deactivate.php | 6 | ||||
-rw-r--r-- | mod/thewire/start.php | 1 |
6 files changed, 25 insertions, 5 deletions
diff --git a/mod/blog/activate.php b/mod/blog/activate.php new file mode 100644 index 000000000..5f67ffbed --- /dev/null +++ b/mod/blog/activate.php @@ -0,0 +1,6 @@ +<?php +/** + * Register the ElggBlog class for the object/blog subtype + */ + +add_subtype('object', 'blog', 'ElggBlog'); diff --git a/mod/blog/deactivate.php b/mod/blog/deactivate.php new file mode 100644 index 000000000..4a275fa94 --- /dev/null +++ b/mod/blog/deactivate.php @@ -0,0 +1,6 @@ +<?php +/** + * Deregister the ElggBlog class + */ + +update_subtype('object', 'blog'); diff --git a/mod/search/README.txt b/mod/search/README.txt index 63b490e28..98a002dd5 100644 --- a/mod/search/README.txt +++ b/mod/search/README.txt @@ -44,11 +44,6 @@ by saying in your plugin's init function: register_entity_type($type, $subtype); -If you are extending ElggObject with your own class, it is also advised -to add a subtype in your plugin's run_once function by saying: - - add_subtype($type, $subtype, $class); - If your plugin uses ElggEntity's standard title and description, and you don't need a custom display, there is nothing else you need to do for your results to appear in search. If you would like more diff --git a/mod/thewire/activate.php b/mod/thewire/activate.php new file mode 100644 index 000000000..1db83f7be --- /dev/null +++ b/mod/thewire/activate.php @@ -0,0 +1,6 @@ +<?php +/** + * Register the ElggWire class for the object/thewire subtype + */ + +add_subtype('object', 'thewire', 'ElggWire'); diff --git a/mod/thewire/deactivate.php b/mod/thewire/deactivate.php new file mode 100644 index 000000000..3e20207a1 --- /dev/null +++ b/mod/thewire/deactivate.php @@ -0,0 +1,6 @@ +<?php +/** + * Deregister the ElggWire class + */ + +update_subtype('object', 'thewire');
\ No newline at end of file diff --git a/mod/thewire/start.php b/mod/thewire/start.php index 2ed0f0b4d..c0890344f 100644 --- a/mod/thewire/start.php +++ b/mod/thewire/start.php @@ -20,6 +20,7 @@ elgg_register_event_handler('init', 'system', 'thewire_init'); function thewire_init() { global $CONFIG; + // this can be removed in favor of activate/deactivate scripts if (!update_subtype('object', 'thewire', 'ElggWire')) { add_subtype('object', 'thewire', 'ElggWire'); } |