diff --git a/html/inc/forum.inc b/html/inc/forum.inc index dd4e74c22e..23d61eb273 100644 --- a/html/inc/forum.inc +++ b/html/inc/forum.inc @@ -1226,12 +1226,16 @@ function is_admin($user) { return false; } +// return +// 'yes' if logged in and can post (show New thread button) +// 'login' if could post if logged in (show login to post msg) +// 'no' if can't post (don't show anythin) +// function user_can_create_thread($user, $forum) { - if (!$user) return false; - if ($forum->is_dev_blog && !is_admin($user)) { - return false; + if ($forum->is_dev_blog) { + return is_admin($user)?'yes':'no'; } - return true; + return $user ?'yes':'login'; } function check_post_access($user, $forum) { diff --git a/html/user/forum_forum.php b/html/user/forum_forum.php index 5d7b6d7e59..137e7b1046 100644 --- a/html/user/forum_forum.php +++ b/html/user/forum_forum.php @@ -95,10 +95,16 @@ echo '