web: skip ownerless threads

This commit is contained in:
David Anderson 2014-08-29 13:31:30 -07:00
parent 42411f2a54
commit e7b4910213
2 changed files with 3 additions and 1 deletions

View File

@ -161,6 +161,7 @@ function show_forum($forum, $start, $sort_style, $user) {
$n = 0; $i=0;
foreach ($threads as $thread) {
$owner = BoincUser::lookup_id($thread->owner);
if (!$owner) continue;
$unread = thread_is_unread($user, $thread);
//if ($thread->status==1){

View File

@ -181,7 +181,7 @@ if ($is_subscribed) {
);
}
//If the logged in user is moderator enable some extra features
// If the logged in user is moderator enable some extra features
//
if (is_moderator($logged_in_user, $forum)) {
if ($thread->hidden){
@ -264,6 +264,7 @@ if (is_news_forum($forum) && $logged_in_user && ($logged_in_user->id == $thread-
}
// Display a box that allows the user to select sorting of the posts
//
echo "</td><td align=\"right\">
<input type=\"hidden\" name=\"id\" value=\"", $thread->id, "\">" .
tra("Sort");