aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-11-06 16:44:05 -0500
committerCash Costello <cash.costello@gmail.com>2011-11-06 16:44:05 -0500
commit75b31ddfaed2c183ec3ccf903c468d2d7f485e20 (patch)
tree96fa0a382a230edb958cd8a1a277e351e6497d50 /mod
parent0d9e96f36c3397730b2674cdd48a6c17298d80b3 (diff)
downloadelgg-75b31ddfaed2c183ec3ccf903c468d2d7f485e20.tar.gz
elgg-75b31ddfaed2c183ec3ccf903c468d2d7f485e20.tar.bz2
Fixes #4068 not forcing update on adds when the subtype exists Refs #4058
Diffstat (limited to 'mod')
-rw-r--r--mod/blog/activate.php6
-rw-r--r--mod/thewire/activate.php6
2 files changed, 10 insertions, 2 deletions
diff --git a/mod/blog/activate.php b/mod/blog/activate.php
index 5f67ffbed..a90525291 100644
--- a/mod/blog/activate.php
+++ b/mod/blog/activate.php
@@ -3,4 +3,8 @@
* Register the ElggBlog class for the object/blog subtype
*/
-add_subtype('object', 'blog', 'ElggBlog');
+if (get_subtype_id('object', 'blog')) {
+ update_subtype('object', 'blog', 'ElggBlog');
+} else {
+ add_subtype('object', 'blog', 'ElggBlog');
+}
diff --git a/mod/thewire/activate.php b/mod/thewire/activate.php
index 1db83f7be..1cc64ceb1 100644
--- a/mod/thewire/activate.php
+++ b/mod/thewire/activate.php
@@ -3,4 +3,8 @@
* Register the ElggWire class for the object/thewire subtype
*/
-add_subtype('object', 'thewire', 'ElggWire');
+if (get_subtype_id('object', 'thewire')) {
+ update_subtype('object', 'thewire', 'ElggWire');
+} else {
+ add_subtype('object', 'thewire', 'ElggWire');
+}