[Fusionforge-commits] FusionForge branch master updated. v6.0.3-461-g3679052

Franck Villaume nerville at libremir.placard.fr.eu.org
Tue Apr 5 00:08:11 CEST 2016


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  36790526349d1d313fe35a7c2f7413f5470f6f8c (commit)
      from  27439f69f5b68e20775c8c0b6c81e6f490a1028b (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 -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=36790526349d1d313fe35a7c2f7413f5470f6f8c

commit 36790526349d1d313fe35a7c2f7413f5470f6f8c
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Tue Apr 5 00:07:47 2016 +0200

    Group: add default setter for news & activity

diff --git a/src/common/include/Group.class.php b/src/common/include/Group.class.php
index 3b0aa05..120370d 100644
--- a/src/common/include/Group.class.php
+++ b/src/common/include/Group.class.php
@@ -1213,6 +1213,21 @@ class Group extends Error {
 		}
 	}
 
+	function setUseNews($booleanparam) {
+		db_begin();
+		$booleanparam = $booleanparam ? 1 : 0;
+		$res = db_query_params('UPDATE groups SET use_news=$1 WHERE group_id=$2',
+					array($booleanparam, $this->getID()));
+		if ($res) {
+			$this->data_array['use_news']=$booleanparam;
+			db_commit();
+			return true;
+		} else {
+			db_rollback();
+			return false;
+		}
+	}
+
 	/**
 	 * usesActivity - whether or not this group has opted to display Project Activities.
 	 *
@@ -1226,6 +1241,21 @@ class Group extends Error {
 		}
 	}
 
+	function setUseActivity($booleanparam) {
+		db_begin();
+		$booleanparam = $booleanparam ? 1 : 0;
+		$res = db_query_params('UPDATE groups SET use_activity=$1 WHERE group_id=$2',
+					array($booleanparam, $this->getID()));
+		if ($res) {
+			$this->data_array['use_activity']=$booleanparam;
+			db_commit();
+			return true;
+		} else {
+			db_rollback();
+			return false;
+		}
+	}
+
 	/**
 	 * usesForum - whether or not this group has opted to use discussion forums.
 	 *

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

Summary of changes:
 src/common/include/Group.class.php | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list