[Fusionforge-commits] FusionForge branch master updated. 6b163817b3d4fc826ada097f1d150e311366c8eb

Alain Peyrat aljeux at fusionforge.org
Tue Oct 23 13:59:51 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  6b163817b3d4fc826ada097f1d150e311366c8eb (commit)
      from  f3669d8a2a38108b500589e628136fa1ac7f0334 (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 6b163817b3d4fc826ada097f1d150e311366c8eb
Author: Alain Peyrat <alain.peyrat at alcatel-lucent.com>
Date:   Tue Oct 23 13:59:40 2012 +0200

    phpdoc & small optimisation in MailingListFactory.class.php

diff --git a/src/common/mail/MailingListFactory.class.php b/src/common/mail/MailingListFactory.class.php
index eeab939..92018e3 100644
--- a/src/common/mail/MailingListFactory.class.php
+++ b/src/common/mail/MailingListFactory.class.php
@@ -43,9 +43,9 @@ class MailingListFactory extends Error {
 
 
 	/**
-	 *  Constructor.
+	 * Constructor.
 	 *
-	 *	@param	object	The Group object to which these mailing lists are associated.
+	 * @param	Group	$Group The Group object to which these mailing lists are associated.
 	 */
 	function MailingListFactory(& $Group) {
 		$this->Error();
@@ -73,10 +73,9 @@ class MailingListFactory extends Error {
 	}
 
 	/**
-	 *	getMailingLists - get an array of MailingList objects for this Group.
+	 * getMailingLists - get an array of MailingList objects for this Group.
 	 *
-	 * @param boolean $admin if we are in admin mode (we want to see deleted lists)
-	 *	@return	array	The array of MailingList objects.
+	 * @return	array	The array of MailingList objects.
 	 */
 	function getMailingLists() {
 		if (isset($this->mailingLists) && is_array($this->mailingLists)) {
@@ -85,9 +84,11 @@ class MailingListFactory extends Error {
 
 		$public_flag = MAIL__MAILING_LIST_IS_PUBLIC;
 
-		$perm = & $this->Group->getPermission ();
-		if ($perm && is_object($perm) && $perm->isMember()) {
-			$public_flag = MAIL__MAILING_LIST_IS_PRIVATE.', '.MAIL__MAILING_LIST_IS_PUBLIC;
+		if (session_loggedin()) {
+			$perm = $this->Group->getPermission();
+			if ($perm && is_object($perm) && $perm->isMember()) {
+				$public_flag = MAIL__MAILING_LIST_IS_PRIVATE.', '.MAIL__MAILING_LIST_IS_PUBLIC;
+			}
 		}
 
 		$result = db_query_params ('SELECT * FROM mail_group_list WHERE group_id=$1 AND is_public = ANY ($2) ORDER BY list_name',

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

Summary of changes:
 src/common/mail/MailingListFactory.class.php |   17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list