- web: fix motd bug

svn path=/trunk/boinc/; revision=20013
This commit is contained in:
David Anderson 2009-12-22 18:39:40 +00:00
parent 918a7e5d26
commit bfe4e1bf3d
2 changed files with 20 additions and 2 deletions

View File

@ -10574,3 +10574,9 @@ Rom 22 Dec 2009
clientgui/
DlgEventLog.cpp, .h
David 22 Dec 2009
- web: fix motd bug
html/inc
news.inc

View File

@ -24,11 +24,23 @@ function news_item($date, $title, $post) {
echo "<span class=news_title>$title</span><br>\n";
}
$d = time_str($date);
$text = bb2html($post->content);
if (is_string($post)) {
$forum_link = false;
$text = bb2html($post);
} else {
$forum_link = true;
$text = bb2html($post->content);
}
echo "
<span class=news_content>$text</span>
<br><span class=news_date>$d
&middot; <a href=".URL_BASE."forum_thread.php?id=$post->thread> ".tra("Comment")."</a></span>
";
if ($forum_link) {
echo "
&middot; <a href=".URL_BASE."forum_thread.php?id=$post->thread> ".tra("Comment")."</a>
";
}
echo "</span>
";
}