diff options
author | Nicolas BERNSTEIN <alexis211@gmail.com> | 2012-04-13 19:26:18 +0200 |
---|---|---|
committer | Nicolas BERNSTEIN <alexis211@gmail.com> | 2012-04-13 19:26:18 +0200 |
commit | ddb6cadf66c7f6c26430a14658d232a88bcceb7a (patch) | |
tree | 1fd9e8c8bbe007f182e020354e27041f0952252e /lib/blog/view.php | |
parent | a535a9e7e017629178b45acc2e96e1d674a0d6fc (diff) | |
download | Bits-ddb6cadf66c7f6c26430a14658d232a88bcceb7a.tar.gz Bits-ddb6cadf66c7f6c26430a14658d232a88bcceb7a.zip |
Minor changes in navigation.
Diffstat (limited to 'lib/blog/view.php')
-rw-r--r-- | lib/blog/view.php | 3 |
1 files changed, 2 insertions, 1 deletions
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"); |