]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
made the event more general for future support of objects with draft/publish status
authorCash Costello <cash.costello@gmail.com>
Tue, 5 Mar 2013 11:59:38 +0000 (06:59 -0500)
committerCash Costello <cash.costello@gmail.com>
Tue, 5 Mar 2013 11:59:38 +0000 (06:59 -0500)
mod/blog/actions/blog/save.php
mod/blog/start.php

index 910da98386363a055695a4750954b77cc03a9c15..9256610cc879b3c3c6525875e812d9d9f0c6ac04 100644 (file)
@@ -160,7 +160,7 @@ if (!$error) {
 
                        // we only want notifications sent when post published
                        register_notification_object('object', 'blog', elgg_echo('blog:newpost'));
-                       elgg_trigger_event('publish', 'blog', $blog);
+                       elgg_trigger_event('publish', 'object', $blog);
 
                        // reset the creation time for posts that move from draft to published
                        if ($guid) {
index 4bd19b40f53ca2794720006772c7d2e47ffd646b..25cd8193521c2db10dff01a5f6c60619cb02d6bd 100644 (file)
@@ -42,7 +42,7 @@ function blog_init() {
        elgg_register_entity_url_handler('object', 'blog', 'blog_url_handler');
 
        // notifications - need to register for unique event because of draft/published status
-       elgg_register_event_handler('publish', 'blog', 'object_notifications');
+       elgg_register_event_handler('publish', 'object', 'object_notifications');
        elgg_register_plugin_hook_handler('notify:entity:message', 'object', 'blog_notify_message');
 
        // add blog link to