diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-07-29 11:42:02 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-07-29 11:42:02 -0300 |
commit | bb3c9a26bb75c76c5934d327548bf08606467b9f (patch) | |
tree | 26760aa866799fc70683ef6845bf54fb17bdc955 /mod/blog/start.php | |
parent | 2feedf39f6484879333a7b77fdc3c184150db8c7 (diff) | |
parent | 398572fd96c72b363fd5a252fb9cbe1cecab1e04 (diff) | |
download | elgg-bb3c9a26bb75c76c5934d327548bf08606467b9f.tar.gz elgg-bb3c9a26bb75c76c5934d327548bf08606467b9f.tar.bz2 |
Merge branch 'floxglove-3' into saravea
Conflicts:
.gitmodules
Diffstat (limited to 'mod/blog/start.php')
-rw-r--r-- | mod/blog/start.php | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/mod/blog/start.php b/mod/blog/start.php index eb6eee05f..25cd81935 100644 --- a/mod/blog/start.php +++ b/mod/blog/start.php @@ -41,8 +41,8 @@ function blog_init() { // override the default url to view a blog object elgg_register_entity_url_handler('object', 'blog', 'blog_url_handler'); - // notifications - register_notification_object('object', 'blog', elgg_echo('blog:newpost')); + // notifications - need to register for unique event because of draft/published status + elgg_register_event_handler('publish', 'object', 'object_notifications'); elgg_register_plugin_hook_handler('notify:entity:message', 'object', 'blog_notify_message'); // add blog link to @@ -214,7 +214,14 @@ function blog_entity_menu_setup($hook, $type, $return, $params) { return $return; } - if ($entity->canEdit() && $entity->status != 'published') { + if ($entity->status != 'published') { + // draft status replaces access + foreach ($return as $index => $item) { + if ($item->getName() == 'access') { + unset($return[$index]); + } + } + $status_text = elgg_echo("blog:status:{$entity->status}"); $options = array( 'name' => 'published_status', |