[Fusionforge-commits] r15937 - in trunk/src/common: forum include

Olivier Berger olberger at fusionforge.org
Wed Jul 4 16:05:55 CEST 2012


Author: olberger
Date: 2012-07-04 16:05:54 +0200 (Wed, 04 Jul 2012)
New Revision: 15937

Modified:
   trunk/src/common/forum/ForumMessage.class.php
   trunk/src/common/include/config-vars.php
Log:
Distinguish use_forum_mail_replies from use_mail (implements https://fusionforge.org/tracker/index.php?func=detail&aid=467&group_id=6&atid=114)

Modified: trunk/src/common/forum/ForumMessage.class.php
===================================================================
--- trunk/src/common/forum/ForumMessage.class.php	2012-07-04 12:56:15 UTC (rev 15936)
+++ trunk/src/common/forum/ForumMessage.class.php	2012-07-04 14:05:54 UTC (rev 15937)
@@ -656,7 +656,7 @@
 			}
 
 			$body = sprintf(_("\nRead and respond to this message at: \n%s"), util_make_url ('/forum/message.php?msg_id='.$this->getID()));
-			if (forge_get_config('use_mail')) {
+			if (forge_get_config('use_mail') && forge_get_config('use_forum_mail_replies')) {
 				$body .= stripcslashes(sprintf(_('
 Or reply to this e-mail entering your response between the following markers:
 %1$s
@@ -690,7 +690,7 @@
 			$extra_headers = "Return-Path: <noreply@".forge_get_config('web_host').">\n";
 			$extra_headers .= "Errors-To: <noreply@".forge_get_config('web_host').">\n";
 			$extra_headers .= "Sender: <noreply@".forge_get_config('web_host').">\n";
-			if (forge_get_config('use_mail')) {
+			if (forge_get_config('use_mail') && forge_get_config('use_forum_mail_replies')) {
 				$extra_headers .= "Reply-To: ".$this->Forum->getReturnEmailAddress()."\n";
 			}
 			$extra_headers .= "Precedence: Bulk\n"

Modified: trunk/src/common/include/config-vars.php
===================================================================
--- trunk/src/common/include/config-vars.php	2012-07-04 12:56:15 UTC (rev 15936)
+++ trunk/src/common/include/config-vars.php	2012-07-04 14:05:54 UTC (rev 15937)
@@ -61,6 +61,9 @@
 	forge_set_config_item_bool ('use_docman', 'core') ;
 	forge_define_config_item ('use_diary', 'core', $GLOBALS['sys_use_diary']) ;
 	forge_set_config_item_bool ('use_diary', 'core') ;
+	// whether to generate the templates allowing to respond to forum notifications by mail
+	forge_define_config_item ('use_forum_mail_replies', 'core', $GLOBALS['sys_use_mail']) ;
+	forge_set_config_item_bool ('use_forum_mail_replies', 'core') ;
 	forge_define_config_item ('use_news', 'core', $GLOBALS['sys_use_news']) ;
 	forge_set_config_item_bool ('use_news', 'core') ;
 	forge_define_config_item ('use_mail', 'core', $GLOBALS['sys_use_mail']) ;




More information about the Fusionforge-commits mailing list