*** empty log message ***

svn path=/trunk/boinc/; revision=10031
This commit is contained in:
Rom Walton 2006-04-26 07:41:25 +00:00
parent 010ec2443e
commit 25c7605f98
2 changed files with 90 additions and 84 deletions

View File

@ -4192,3 +4192,11 @@ Rom 25 Apr 2006
api/
gutil.C
Rom 25 Apr 2006
- Bug Fix: Hide everything about a thread if it has been closed to
prevent identity information being disclosed as part of the
subject line.
html/user/
forum_thread.php

View File

@ -27,6 +27,14 @@ $category = getCategory($forum->category);
$logged_in_user = get_logged_in_user(false);
$logged_in_user = getForumPreferences($logged_in_user);
if (($thread->hidden) && (!isSpecialUser($logged_in_user,0))) {
// Hide anything and everything about a thread if it has been closed.
// People are posting identity information in the thread subject
error_page("This thread has been hidden for administrative purposes");
}
$title = cleanup_title($thread->title);
if ($category->is_helpdesk) {
if (!$sort_style) {
@ -66,92 +74,82 @@ if ($logged_in_user) {
show_forum_title($forum, $thread, $category->is_helpdesk);
if (($thread->hidden) && (!isSpecialUser($logged_in_user,0))) {
/* If the user logged in is a moderator, show him the
+ * thread if he goes so far as to name it by ID like this.
+ * Otherwise, hide the thread.
+ */
error_page("This thread has been hidden for administrative purposes");
echo "
<form action=\"forum_thread.php\">
<input type=\"hidden\" name=\"id\" value=\"", $thread->id, "\">
<table width=\"100%\" cellspacing=0 cellpadding=0>
<tr>
<td align=\"left\">
";
$link = "<a href=\"forum_reply.php?thread=" . $thread->id;
if ($category->is_helpdesk) {
$link = $link . "&helpdesk=1#input\">Answer this question";
} else {
echo "
<form action=\"forum_thread.php\">
<input type=\"hidden\" name=\"id\" value=\"", $thread->id, "\">
<table width=\"100%\" cellspacing=0 cellpadding=0>
<tr>
<td align=\"left\">
";
$link = "<a href=\"forum_reply.php?thread=" . $thread->id;
if ($category->is_helpdesk) {
$link = $link . "&helpdesk=1#input\">Answer this question";
} else {
$link = $link . "#input\">Reply to this thread";
}
echo $link, "</a><br>";
if ($is_subscribed) {
if ($category->is_helpdesk) {
echo "You are subscribed to this question. ";
} else {
echo "You are subscribed to this thread. ";
}
echo "<a href=\"forum_subscribe.php?action=unsubscribe&amp;thread=$thread->id\">Click here to unsubscribe</a>.";
} else {
if ($category->is_helpdesk) {
echo "<a href=\"forum_subscribe.php?action=subscribe&amp;thread=$thread->id\">Subscribe to this question</a>";
} else {
echo "<a href=\"forum_subscribe.php?action=subscribe&amp;thread=$thread->id\">Subscribe to this thread</a>";
}
}
if (isSpecialUser($logged_in_user,0)){ //If logged in users is moderator
echo "<br /><a href=\"forum_moderate_thread.php?action=hide&amp;thread=$thread->id\">Delete this thread</a>";
if($thread->sticky)
{ echo "<br /><a href=\"forum_moderate_thread_action.php?action=desticky&amp;thread=$thread->id\">De-sticky this thread</a>"; }
else
{ echo "<br /><a href=\"forum_moderate_thread_action.php?action=sticky&amp;thread=$thread->id\">Make this thread sticky</a>"; }
}
echo "</td>";
echo "<td align=right style=\"border:0px\">";
if ($category->is_helpdesk) {
show_select_from_array("sort", $answer_sort_styles, $sort_style);
} else {
echo "Sort ";
show_select_from_array("sort", $thread_sort_styles, $sort_style);
//show_select_from_array("filter", $thread_filter_styles, $filter_min);
}
echo "<input type=submit value=OK>\n</td>";
echo "</tr>\n</table>\n</form>\n";
// Here is where the actual thread begins.
if ($category->is_helpdesk) {
$headings = array(array("Author","authorcol"), "Question","");
} else {
$headings = array(array("Author","authorcol"), "Message","");
}
start_forum_table($headings, "id=\"thread\" width=100%");
show_posts($thread, $sort_style, $filter, true, true, $category->is_helpdesk);
end_forum_table();
echo "<p>";
$link = "<a href=\"forum_reply.php?thread=" . $thread->id;
if ($category->is_helpdesk) {
$link = $link . "&helpdesk=1#input\">Answer this question";
} else {
$link = $link . "#input\">Reply to this thread";
}
echo $link, "</a><br>\n</p>";
show_forum_title($forum, $thread, $category->is_helpdesk);
$link = $link . "#input\">Reply to this thread";
}
echo $link, "</a><br>";
if ($is_subscribed) {
if ($category->is_helpdesk) {
echo "You are subscribed to this question. ";
} else {
echo "You are subscribed to this thread. ";
}
echo "<a href=\"forum_subscribe.php?action=unsubscribe&amp;thread=$thread->id\">Click here to unsubscribe</a>.";
} else {
if ($category->is_helpdesk) {
echo "<a href=\"forum_subscribe.php?action=subscribe&amp;thread=$thread->id\">Subscribe to this question</a>";
} else {
echo "<a href=\"forum_subscribe.php?action=subscribe&amp;thread=$thread->id\">Subscribe to this thread</a>";
}
}
if (isSpecialUser($logged_in_user,0)){ //If logged in users is moderator
echo "<br /><a href=\"forum_moderate_thread.php?action=hide&amp;thread=$thread->id\">Delete this thread</a>";
if($thread->sticky)
{ echo "<br /><a href=\"forum_moderate_thread_action.php?action=desticky&amp;thread=$thread->id\">De-sticky this thread</a>"; }
else
{ echo "<br /><a href=\"forum_moderate_thread_action.php?action=sticky&amp;thread=$thread->id\">Make this thread sticky</a>"; }
}
echo "</td>";
echo "<td align=right style=\"border:0px\">";
if ($category->is_helpdesk) {
show_select_from_array("sort", $answer_sort_styles, $sort_style);
} else {
echo "Sort ";
show_select_from_array("sort", $thread_sort_styles, $sort_style);
//show_select_from_array("filter", $thread_filter_styles, $filter_min);
}
echo "<input type=submit value=OK>\n</td>";
echo "</tr>\n</table>\n</form>\n";
// Here is where the actual thread begins.
if ($category->is_helpdesk) {
$headings = array(array("Author","authorcol"), "Question","");
} else {
$headings = array(array("Author","authorcol"), "Message","");
}
start_forum_table($headings, "id=\"thread\" width=100%");
show_posts($thread, $sort_style, $filter, true, true, $category->is_helpdesk);
end_forum_table();
echo "<p>";
$link = "<a href=\"forum_reply.php?thread=" . $thread->id;
if ($category->is_helpdesk) {
$link = $link . "&helpdesk=1#input\">Answer this question";
} else {
$link = $link . "#input\">Reply to this thread";
}
echo $link, "</a><br>\n</p>";
show_forum_title($forum, $thread, $category->is_helpdesk);
page_tail();
?>