aboutsummaryrefslogtreecommitdiff
path: root/mod/blog/start.php
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2013-03-13 02:13:17 +0100
committerSem <sembrestels@riseup.net>2013-03-13 02:13:17 +0100
commitd730a0c5861c2e79faa3e58dd2b171ca4d197c6f (patch)
treecb4658e1c60a60c5f663845d49b108dd4608a89a /mod/blog/start.php
parent0fb3e5396d10d21323eb3bbc04727fd4a5a6d06d (diff)
parent34b14b305f5a106316fdc403c4ce80b25e89b51d (diff)
downloadelgg-d730a0c5861c2e79faa3e58dd2b171ca4d197c6f.tar.gz
elgg-d730a0c5861c2e79faa3e58dd2b171ca4d197c6f.tar.bz2
Merge tag '1.8.14' of git://github.com/Elgg/Elgg into foxglove-3
Elgg 1.8.14 Conflicts: mod/tinymce/vendor/tinymce/jscripts/tiny_mce/langs/en.js mod/tinymce/vendor/tinymce/jscripts/tiny_mce/themes/advanced/langs/en_dlg.js
Diffstat (limited to 'mod/blog/start.php')
-rw-r--r--mod/blog/start.php13
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',