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_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) +."
\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 "
'; -echo "[Create a new thread]
"; +echo ''; +echo "[Create a new thread] %s
."
+msgstr "The download files have names like %s
."
msgid "RLN_LINUX_RUN_SEA"
msgstr "After downloading the file, type%s"