From: <jy...@us...> - 2013-06-03 12:12:17
|
Revision: 46142 http://sourceforge.net/p/tikiwiki/code/46142 Author: jyhem Date: 2013-06-03 12:12:14 +0000 (Mon, 03 Jun 2013) Log Message: ----------- [FIX] When blog is configured to let other authors post, let them view unpublished and private posts Modified Paths: -------------- trunk/tiki-view_blog_post.php Modified: trunk/tiki-view_blog_post.php =================================================================== --- trunk/tiki-view_blog_post.php 2013-06-03 11:59:36 UTC (rev 46141) +++ trunk/tiki-view_blog_post.php 2013-06-03 12:12:14 UTC (rev 46142) @@ -62,13 +62,18 @@ $ownsblog = 'y'; } -if ($ownsblog == 'n' && $tiki_p_blog_admin != 'y' && $post_info["priv"] == 'y') { +$ownspost = 'n'; +if ($user && $user == $post_info["user"]) { + $ownspost = 'y'; +} + +if ($ownspost == 'n' && $ownsblog == 'n' && $tiki_p_blog_admin != 'y' && $post_info["priv"] == 'y') { $smarty->assign('errortype', 401); $smarty->assign('msg', tra("You do not have permission to view this blog post while it is marked as private")); $smarty->display("error.tpl"); die; } -if ($ownsblog == 'n' && $tiki_p_blog_admin != 'y' && $post_info['created'] > $tikilib->now) { +if ($ownspost == 'n' && $ownsblog == 'n' && $tiki_p_blog_admin != 'y' && $post_info['created'] > $tikilib->now) { $smarty->assign('errortype', 401); $smarty->assign('msg', tra('Permission denied')); $smarty->display("error.tpl"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |