[Fusionforge-commits] FusionForge branch master updated. b0d322e56e226923f7dda7397dd50084ac0f7daa

Alain Peyrat aljeux at fusionforge.org
Thu Oct 18 09:47:12 CEST 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  b0d322e56e226923f7dda7397dd50084ac0f7daa (commit)
      from  0a86b5e2e732f1bf8dc3d15df27f8a8d49d9592b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b0d322e56e226923f7dda7397dd50084ac0f7daa
Author: Alain Peyrat <alain.peyrat at alcatel-lucent.com>
Date:   Thu Oct 18 09:47:07 2012 +0200

    Fix PHP syntax error

diff --git a/src/common/docman/Document.class.php b/src/common/docman/Document.class.php
index a54ed3f..e47d602 100644
--- a/src/common/docman/Document.class.php
+++ b/src/common/docman/Document.class.php
@@ -903,28 +903,24 @@ class Document extends Error {
 			$BCC .= $dg->getMonitoredUserEmailAddress();
 		}
 		if (strlen($BCC) > 0) {
-			$sess = session_get_user();
+			$session = session_get_user();
 			if ($new) {
 				$status = _('New document');
 			} else {
-				$status = _('Updated document').' '._('by').' ' . $sess->getRealName();
+				$status = _('Updated document').' '._('by').' ' . $session->getRealName();
+			}
+			$subject = '['.$this->Group->getPublicName().'] '.$status.' - '.$this->getName();
+			$body = _('Project:').' '.$this->Group->getPublicName()."\n";
+			$body .= _('Directory:').' '.$this->getDocGroupName()."\n";
+			$body .= _('Document title:').' '.$this->getName()."\n";
+			$body .= _('Document description:').' '.util_unconvert_htmlspecialchars($this->getDescription())."\n";
+			$body .= _('Submitter:').' '.$this->getCreatorRealName()." (".$this->getCreatorUserName().") \n";
+			$body .= "\n\n-------------------------------------------------------\n".
+				_('For more info, visit:').
+				"\n\n" . util_make_url('/docman/?group_id='.$this->Group->getID().'&view=listfile&dirid='.$this->getDocGroupID());
+
 			$BCCarray = explode(',',$BCC);
 			foreach ($BCCarray as $dest_email) {
-				if ($new) {
-					$status = _('New document');
-				} else {
-					$status = _('Updated document');
-				}
-				$subject = '['.$this->Group->getPublicName().'] '.$status.' - '.$this->getName();
-				$body = _('Project:').' '.$this->Group->getPublicName()."\n";
-				$body .= _('Directory:').' '.$this->getDocGroupName()."\n";
-				$body .= _('Document title:').' '.$this->getName()."\n";
-				$body .= _('Document description:').' '.util_unconvert_htmlspecialchars($this->getDescription())."\n";
-				$body .= _('Submitter:').' '.$this->getCreatorRealName()." (".$this->getCreatorUserName().") \n";
-				$body .= "\n\n-------------------------------------------------------\n".
-					_('For more info, visit:').
-					"\n\n" . util_make_url('/docman/?group_id='.$this->Group->getID().'&view=listfile&dirid='.$this->getDocGroupID());
-
 				util_send_message($dest_email, $subject, $body, 'noreply@'.forge_get_config('web_host'), '', _('Docman'));
 			}
 		}
@@ -975,6 +971,7 @@ class Document extends Error {
 		return true;
 	}
 
+
 	/**
 	 * downloadUp - +1 on download column
 	 *

-----------------------------------------------------------------------

Summary of changes:
 src/common/docman/Document.class.php |   31 ++++++++++++++-----------------
 1 file changed, 14 insertions(+), 17 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list