aboutsummaryrefslogtreecommitdiff
path: root/mod/thewire
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-02-16 11:48:34 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-02-16 11:48:34 -0200
commitb6ee1b93376d42f8a8fcee0127bc10f84d1e018e (patch)
treecbde5e4d0b745c3bb854c215bccea8b2d6bb367e /mod/thewire
parent694306cf537fb8cb45beb7d4fd63c5b56cb5c4da (diff)
parent5aff5b3913fbb6226d8fb3162453c58888fba38d (diff)
downloadelgg-b6ee1b93376d42f8a8fcee0127bc10f84d1e018e.tar.gz
elgg-b6ee1b93376d42f8a8fcee0127bc10f84d1e018e.tar.bz2
Merge branch 'master' into saravea
Diffstat (limited to 'mod/thewire')
-rw-r--r--mod/thewire/start.php11
-rw-r--r--mod/thewire/upgrades/2012122701-fix_entity_class.php8
-rw-r--r--mod/thewire/views/rss/object/thewire.php2
3 files changed, 20 insertions, 1 deletions
diff --git a/mod/thewire/start.php b/mod/thewire/start.php
index 1ba48263a..8b01cc57a 100644
--- a/mod/thewire/start.php
+++ b/mod/thewire/start.php
@@ -67,6 +67,8 @@ function thewire_init() {
elgg_register_action("thewire/delete", "$action_base/delete.php");
elgg_register_plugin_hook_handler('unit_test', 'system', 'thewire_test');
+
+ elgg_register_event_handler('upgrade', 'system', 'thewire_run_upgrades');
}
/**
@@ -462,3 +464,12 @@ function thewire_test($hook, $type, $value, $params) {
$value[] = $CONFIG->pluginspath . 'thewire/tests/regex.php';
return $value;
}
+
+function thewire_run_upgrades() {
+ $path = dirname(__FILE__) . '/upgrades/';
+ $files = elgg_get_upgrade_files($path);
+
+ foreach ($files as $file) {
+ include $path . $file;
+ }
+} \ No newline at end of file
diff --git a/mod/thewire/upgrades/2012122701-fix_entity_class.php b/mod/thewire/upgrades/2012122701-fix_entity_class.php
new file mode 100644
index 000000000..a1f382712
--- /dev/null
+++ b/mod/thewire/upgrades/2012122701-fix_entity_class.php
@@ -0,0 +1,8 @@
+<?php
+/**
+ * Register thewire objects with the ElggWire class.
+ */
+
+if (get_subtype_id('object', 'thewire')) {
+ update_subtype('object', 'thewire', 'ElggWire');
+} \ No newline at end of file
diff --git a/mod/thewire/views/rss/object/thewire.php b/mod/thewire/views/rss/object/thewire.php
index 494c2c8dc..8fddb8aa8 100644
--- a/mod/thewire/views/rss/object/thewire.php
+++ b/mod/thewire/views/rss/object/thewire.php
@@ -15,7 +15,7 @@ $title = elgg_echo('thewire:by', array($owner->name));
$permalink = htmlspecialchars($vars['entity']->getURL(), ENT_NOQUOTES, 'UTF-8');
$pubdate = date('r', $vars['entity']->getTimeCreated());
-$description = autop($vars['entity']->description);
+$description = elgg_autop($vars['entity']->description);
$creator = elgg_view('page/components/creator', $vars);
$georss = elgg_view('page/components/georss', $vars);