diff --git a/checkin_notes b/checkin_notes index a288f10fc4..e284489220 100755 --- a/checkin_notes +++ b/checkin_notes @@ -8581,4 +8581,17 @@ Walt 8 Aug 2006 when detaching from project. clientgui/ - ViewProjects.cpp \ No newline at end of file + ViewProjects.cpp + +David 9 Aug 2006 + - bug fixes in forum code + + html/ + inc/ + db_forum.inc + forum_email.inc + forum_forum.inc + translation.inc + user/ + forum_forum.php + white.css diff --git a/doc/release_notes.php b/doc/release_notes.php index 6cd76c2043..73ad1cd961 100644 --- a/doc/release_notes.php +++ b/doc/release_notes.php @@ -51,12 +51,11 @@ echo "

".tr(RLN_LINUX)."

".tr(RLN_LINUX_INSTALL_SEA_DESC)." -

-".tr(RLN_LINUX_DL_FILENAME)." -".sprintf(tr(RLN_LINUX_RUN_SEA),"sh boinc_5.2.13_i686-pc-linux-gnu.sh")." - -".tr(RLN_LINUX_RESULTOF_SEA)." -

+

" +.sprintf(tr(RLN_LINUX_DL_FILENAME),"boinc_5.2.13_i686-pc-linux-gnu.sh")." " +.sprintf(tr(RLN_LINUX_RUN_SEA),"sh boinc_5.2.13_i686-pc-linux-gnu.sh") +.tr(RLN_LINUX_RESULTOF_SEA) +."

boinc
".tr(RLN_BOINC_CORE_CL)."
boincmgr diff --git a/html/inc/db_forum.inc b/html/inc/db_forum.inc index bc1826bc73..5034a682f0 100644 --- a/html/inc/db_forum.inc +++ b/html/inc/db_forum.inc @@ -95,6 +95,9 @@ function getThreads($forumID, $min=-1, $nRec=-1, $sort_style='modified-new', $sh $data = mysql_query($sql); echo mysql_error(); + if (!$data) { + return array(); + } return $data; } diff --git a/html/inc/forum.inc b/html/inc/forum.inc index e2bbf55a72..39e6de1aa1 100644 --- a/html/inc/forum.inc +++ b/html/inc/forum.inc @@ -402,9 +402,14 @@ function show_select_from_array($name, $array, $selection) { **/ function show_forum_title($forum=NULL, $thread=NULL) { echo "

\n"; - $category = getCategory($forum->category); - $where = $category->is_helpdesk?tr(LINKS_QA):tr(FORUM_TITLE_SHORT); - $top_url = $category->is_helpdesk?"forum_help_desk.php":"forum_index.php"; + if ($forum) { + $category = $forum->getCategory(); + $is_helpdesk = $category->getType(); + } else { + $is_helpdesk = false; + } + $where = $is_helpdesk?tr(LINKS_QA):tr(FORUM_TITLE_SHORT); + $top_url = $is_helpdesk?"forum_help_desk.php":"forum_index.php"; if (!$forum && !$thread) { echo "

"; echo $where; @@ -477,7 +482,8 @@ function show_post2($post, $n) { //Todo: factor this array out, it is also used elsewhere $deleted_text = array( "Obscene", "Flame/Hate", "Commercial spam", "Flamebait", "Doublepost", "Other"); $deleted = "
[Deleted " . - "by a moderator as " . $deleted_text[$post->hidden-1] . + "by a moderator " . + //as " . $deleted_text[$post->hidden-1] . "] "; } else { $deleted = ""; diff --git a/html/inc/forum_email.inc b/html/inc/forum_email.inc index f73e9099c5..31a34c85d8 100644 --- a/html/inc/forum_email.inc +++ b/html/inc/forum_email.inc @@ -48,25 +48,25 @@ function re_send_email($user, $subject, $body) { * to let them know what happened. **/ function send_moderation_email($post, $message) { - global $master_url; $body = ""; $thread = $post->getThread(); - $subject = PROJECT." forum moderation notice for $user->name"; + $user = $post->getOwner(); + $subject = PROJECT." forum moderation notice"; $body = PROJECT." notification: -This email is sent to inform you that one of your posts in the forum has been affected by moderation in ".PROJECT.": +This email is to inform you that one of your posts in the forum has been affected by moderation in ".PROJECT.": Thread: ".$thread->getTitle()." - Link: ".$master_url."/forum_thread.php?id=".$thread->getID()." + Link: ".URL_BASE."/forum_thread.php?id=".$thread->getID()." The moderator gave this explanation to why your post was moderated: ".$message; $body .= " -This was the contents of your post: +This was the content of your post: ".$post->getContent()." -For further information and assistance with ".PROJECT." go to ".$master_url; - return re_send_email($post->getOwner(), $subject, $body); +For further information and assistance with ".PROJECT." go to ".MASTER_URL; + return re_send_email($user, $subject, $body); } @@ -75,22 +75,21 @@ For further information and assistance with ".PROJECT." go to ".$master_url; * to let them know what happened. */ function send_thread_moderation_email($thread, $message) { - global $master_url; $user = $thread->getOwner(); $body = ""; - $subject = PROJECT." forum moderation notice for $user->name"; + $subject = PROJECT." forum moderation notice"; $body = PROJECT." notification: This email is sent to inform you that one of your threads in the forum has been affected by moderation in ".PROJECT.": Thread: ".$thread->getTitle()." - Link: ".$master_url."/forum_thread.php?id=".$thread->getID()." + Link: ".MASTER_URL."/forum_thread.php?id=".$thread->getID()." The moderator gave this explanation to why your thread was moderated: ".$message; $body .= " -For further information and assistance with ".PROJECT." go to ".$master_url; +For further information and assistance with ".PROJECT." go to ".MASTER_URL; return re_send_email($user, $subject, $body); } @@ -113,7 +112,6 @@ function send_reply_notification_email($thread, $user){ * it. **/ function send_report_post_email($user, $thread, $post, $message) { - global $master_url; $forum_post_reporting_admin = newUser(FORUM_MODERATION_EMAIL_USER_ID); $body = ""; @@ -124,7 +122,7 @@ function send_report_post_email($user, $thread, $post, $message) { This email is sent to inform you that one of the posts in the forum was reported as offensive in ".PROJECT.": Thread: ".$thread->getTitle()." Post: ".$post->getID()." - Link: $master_url/forum_thread.php?id=".$thread->getID()."#".$post->getID()." + Link: ".URL_BASE."/forum_thread.php?id=".$thread->getID()."#".$post->getID()." The reporting user gave this explanation to why the post was reported: ".$message." @@ -132,7 +130,7 @@ The reporting user gave this explanation to why the post was reported: This was the contents of the post: ".$post->getContent()." -For further information and assistance with ".PROJECT." go to $master_url"; +For further information and assistance with ".PROJECT." go to ".MASTER_URL; //Security check, do we have an admin? if (!$forum_post_reporting_admin) error_page("This project has not yet defined an administrator to handle this kind of forum reports. Please contact the project and tell them to add this information in their html/project/project.inc file"); return re_send_email($forum_post_reporting_admin, $subject, $body); diff --git a/html/inc/forum_forum.inc b/html/inc/forum_forum.inc index a801631dc5..8d9a637db4 100644 --- a/html/inc/forum_forum.inc +++ b/html/inc/forum_forum.inc @@ -111,8 +111,12 @@ class Forum { function getThreads($start, $count, $sort_style=MODIFIED_NEW, $show_hidden=false, $sticky_first=true){ if (!$this->threads){ $list = $this->dbhandler->getThreads($this, $start, $count, $sort_style, $show_hidden, $sticky_first); - foreach ($list as $key => $thread){ - $this->threads[] = new Thread($thread->id, $thread); + if ($list) { + foreach ($list as $key => $thread){ + $this->threads[] = new Thread($thread->id, $thread); + } + } else { + $this->threads = array(); } } return $this->threads; @@ -169,4 +173,4 @@ function show_page_nav($forum, $start=0){ } return $navbar; } -?> \ No newline at end of file +?> diff --git a/html/inc/translation.inc b/html/inc/translation.inc index e22b376af7..f1f7915b0a 100644 --- a/html/inc/translation.inc +++ b/html/inc/translation.inc @@ -245,7 +245,10 @@ function languagesNeedsRebuild($langdir,$transdir,$prjtransdir, $compdir){ if ($file==".." or $file==".") continue; if (substr($file,-3)==".po"){ //only files ending in .po - if (filemtime($langdir.$transdir.$file)>$last_compile) return true; + if (filemtime($langdir.$transdir.$file)>$last_compile) { + closedir($dh); + return true; + } } } closedir($dh); diff --git a/html/user/forum_forum.php b/html/user/forum_forum.php index 461213ebc1..177a2e424f 100644 --- a/html/user/forum_forum.php +++ b/html/user/forum_forum.php @@ -33,7 +33,13 @@ if (!$sort_style) { } } -page_head(tr(FORUM_TITLE_SHORT).' : '.$forum->getTitle()); +$Category = $forum->getCategory(); +if ($Category->getType()!=0){ + page_head(tr(LINKS_QA).' : '.$forum->getTitle()); +} else { + page_head(tr(FORUM_TITLE_SHORT).' : '.$forum->getTitle()); +} + // Allow users with a linktab-browser to get some usefull links echo ''; @@ -44,7 +50,6 @@ echo ' show_forum_title($forum, NULL); -$Category = $forum->getCategory(); if ($Category->getType()!=0){ echo "

@@ -54,13 +59,13 @@ if ($Category->getType()!=0){ } -echo '

'; -echo "[Create a new thread]

"; +echo ''; +echo "[Create a new thread]

"; echo '
'; echo ''; show_select_from_array("sort", $forum_sort_styles, $sort_style); -echo ''; +echo '

'; echo "\n\n
"; show_forum($forum, $start, $sort_style, $user); diff --git a/html/user/white.css b/html/user/white.css index e355a9c326..71c93c8de7 100644 --- a/html/user/white.css +++ b/html/user/white.css @@ -146,14 +146,14 @@ img { blockquote { border-left: 2px solid blue; background: #DDDDDD; - padding-left: 5px; + padding-left: 3px; padding-bottom: 0px; margin-bottom: 0px; margin-left: 10px; font-style: italic; } -blockquote.postbody { +#blockquote.postbody { border-style: inset; border-color: blue; background-color: rgb(240,240,255); @@ -188,9 +188,9 @@ td.postheader{ } td.postbody { - font-size: 0.9em; - height: 95px; + font-size: 9pt; } + td.postfooter{ background-color: rgb(220,210,210); border-top: 1px solid rgb(190,190,200); @@ -200,7 +200,7 @@ td.postfooter{ } tr.helpdeskseperator{ - height:15px; + height: 10pt; } tr.postseperator{ @@ -214,7 +214,7 @@ tr.postseperator td{ } td.threadline { - font-size:9pt; +#font-size:10pt; text-align:left; } diff --git a/languages/translations/en.po b/languages/translations/en.po index 71ece7628d..522a3c6fa4 100644 --- a/languages/translations/en.po +++ b/languages/translations/en.po @@ -507,7 +507,7 @@ msgstr "BOINC runs whenever any user is logged in. " "textual information only)." msgid "RLN_WIN_SERVICE_INSTALL" -msgstr "Shared installation" +msgstr "Service installation" msgid "RLN_MSWIN_INSTALL_WINSERVICE_DESC" msgstr "BOINC runs all the time (even when no one is logged in). " @@ -523,7 +523,7 @@ msgstr "BOINC for Linux is distributed as a self-extracting archive. " "UNIX command-line interface." msgid "RLN_LINUX_DL_FILENAME" -msgstr "The download files have names like %s ." +msgstr "The download files have names like %s." msgid "RLN_LINUX_RUN_SEA" msgstr "After downloading the file, type
%s
"