diff options
Diffstat (limited to 'mod/thewire/start.php')
-rw-r--r-- | mod/thewire/start.php | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/mod/thewire/start.php b/mod/thewire/start.php index 328e5d46c..ebfe29538 100644 --- a/mod/thewire/start.php +++ b/mod/thewire/start.php @@ -18,18 +18,14 @@ elgg_register_event_handler('init', 'system', 'thewire_init'); * The Wire initialization */ 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'); - } // register the wire's JavaScript $thewire_js = elgg_get_simplecache_url('js', 'thewire'); elgg_register_simplecache_view('js/thewire'); elgg_register_js('elgg.thewire', $thewire_js, 'footer'); + elgg_register_ajax_view('thewire/previous'); + // add a site navigation item $item = new ElggMenuItem('thewire', elgg_echo('thewire'), 'thewire/all'); elgg_register_menu_item('site', $item); @@ -66,7 +62,7 @@ function thewire_init() { elgg_register_plugin_hook_handler('notify:entity:message', 'object', 'thewire_notify_message'); // Register actions - $action_base = $CONFIG->pluginspath . 'thewire/actions'; + $action_base = elgg_get_plugins_path() . 'thewire/actions'; elgg_register_action("thewire/add", "$action_base/add.php"); elgg_register_action("thewire/delete", "$action_base/delete.php"); @@ -217,7 +213,7 @@ function thewire_filter($text) { // usernames $text = preg_replace( - '/(^|[^\w])@([\w.]+)/', + '/(^|[^\w])@([\p{L}\p{Nd}._]+)/u', '$1<a href="' . $CONFIG->wwwroot . 'thewire/owner/$2">@$2</a>', $text); |