From ddb6cadf66c7f6c26430a14658d232a88bcceb7a Mon Sep 17 00:00:00 2001 From: Nicolas BERNSTEIN Date: Fri, 13 Apr 2012 19:26:18 +0200 Subject: Minor changes in navigation. --- lib/blog/view.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/blog/view.php') diff --git a/lib/blog/view.php b/lib/blog/view.php index 15c4d6e..fa375d8 100644 --- a/lib/blog/view.php +++ b/lib/blog/view.php @@ -15,7 +15,7 @@ $post = mysql_fetch_assoc(sql( "WHERE blog_posts.id = $postid" )); -assert_error($post && $post['draft'] == 0, +assert_error($post && ($post['draft'] == 0 || $post['owner_id'] == $user['id']), "This post does not exist."); $comments = array(); @@ -34,6 +34,7 @@ $can_post = ($user['priv'] >= $apps['blog']['drafts'] && $user['id'] != 0); $can_edit = ($user['priv'] >= $apps['blog']['edit'] && $user['id'] != 0); $can_delete = ($user['priv'] >= $apps['blog']['delete'] && $user['id'] != 0); $can_comment = ($user['priv'] >= $apps['blog']['comment'] && $user['id'] != 0); +$is_draft = ($post['draft'] != 0); $can_delcom = ($user['priv'] >= $apps['blog']['delcom'] && $user['id'] != 0); require("tpl/blog/view.php"); -- cgit v1.2.3