[Fusionforge-commits] FusionForge branch master updated. e155efe7ab2f6e51d773742303a913fcf635711e

Franck VILLAUME nerville at fusionforge.org
Wed Dec 25 14:17:24 CET 2013


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  e155efe7ab2f6e51d773742303a913fcf635711e (commit)
      from  b275a0f9f86b2386a5e8fd756a4a984609e4e533 (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 e155efe7ab2f6e51d773742303a913fcf635711e
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Wed Dec 25 14:16:42 2013 +0100

    indent

diff --git a/src/common/survey/SurveyFactory.class.php b/src/common/survey/SurveyFactory.class.php
index a6bd161..1a8bf2a 100644
--- a/src/common/survey/SurveyFactory.class.php
+++ b/src/common/survey/SurveyFactory.class.php
@@ -46,7 +46,7 @@ class SurveyFactory extends Error {
 	/**
 	 * Constructor.
 	 *
-	 * @param	object	$Group  	The Group object to which this survey is associated.
+	 * @param	object	$Group	The Group object to which this survey is associated.
 	 */
 	function __construct(&$Group) {
 		$this->Error();
diff --git a/src/common/survey/SurveyQuestion.class.php b/src/common/survey/SurveyQuestion.class.php
index 6f49e88..1a2e78e 100644
--- a/src/common/survey/SurveyQuestion.class.php
+++ b/src/common/survey/SurveyQuestion.class.php
@@ -40,17 +40,17 @@ class SurveyQuestion extends Error {
 	 */
 	var $Group;
 
-    /**
-     * Constructor.
-     *
-     * @param $Group
-     * @param bool $question_id
-     * @param bool $arr
-     * @internal param \The $object Group object to which this Survey Question is associated.
-     * @internal param \The $int question_id.
-     * @internal param \The $array associative array of data.
-     * @return \SurveyQuestion
-     */
+	/**
+	* Constructor.
+	*
+	* @param	$Group
+	* @param	bool	$question_id
+	* @param	bool	$arr
+	* @internal	param	\The $object Group object to which this Survey Question is associated.
+	* @internal	param	\The $int question_id.
+	* @internal	param	\The $array associative array of data.
+	* @return	\SurveyQuestion
+	*/
 	function __construct(&$Group, $question_id = false, $arr = false) {
 		$this->Error();
 		if (!$Group || !is_object($Group)) {
@@ -82,14 +82,14 @@ class SurveyQuestion extends Error {
 	/**
 	 * create - use this function to create a survey question
 	 *
-	 * @param	string	$question		The question
-	 * @param	int		$question_type	The question type
-	 *                      1: Radio Buttons 1-5
-	 *                      2: Text Area
-	 *                      3: Radio Buttons Yes/No
-	 *                      4: Comment Only
-	 *                      5: Text Field
-	 *                      6: None
+	 * @param	string	$question	The question
+	 * @param	int	$question_type	The question type
+	 *					1: Radio Buttons 1-5
+	 *					2: Text Area
+	 *					3: Radio Buttons Yes/No
+	 *					4: Comment Only
+	 *					5: Text Field
+	 *					6: None
 	 * @return	bool	success.
 	 */
 	function create($question, $question_type = 1) {
@@ -120,15 +120,15 @@ class SurveyQuestion extends Error {
 	/**
 	 * update - use this function to update a survey question
 	 *
-	 * @param	string	$question		The question
-	 * @param	int		$question_type	The question type
-	 *                      1: Radio Buttons 1-5
-	 *                      2: Text Area
-	 *                      3: Radio Buttons Yes/No
-	 *                      4: Comment Only
-	 *                      5: Text Field
-	 *                      6: None
-	 *	@return	boolean	success.
+	 * @param	string	$question	The question
+	 * @param	int	$question_type	The question type
+	 *					1: Radio Buttons 1-5
+	 *					2: Text Area
+	 *					3: Radio Buttons Yes/No
+	 *					4: Comment Only
+	 *					5: Text Field
+	 *					6: None
+	 * @return	boolean	success.
 	 */
 	function update($question, $question_type = 1) {
 		if (strlen($question) < 3) {
diff --git a/src/common/survey/SurveyQuestionFactory.class.php b/src/common/survey/SurveyQuestionFactory.class.php
index 54e7e7e..d2f6a1e 100644
--- a/src/common/survey/SurveyQuestionFactory.class.php
+++ b/src/common/survey/SurveyQuestionFactory.class.php
@@ -43,9 +43,9 @@ class SurveyQuestionFactory extends Error {
 	var $questions;
 
 	/**
-	 *  Constructor.
+	 * Constructor.
 	 *
-	 *	@param	object	$Group	The Group object to which this survey question is associated.
+	 * @param	object	$Group	The Group object to which this survey question is associated.
 	 */
 	function __construct(&$Group) {
 		$this->Error();
@@ -66,19 +66,19 @@ class SurveyQuestionFactory extends Error {
 	}
 
 	/**
-	 *	getGroup - get the Group object this SurveyQuestionFactory is associated with.
+	 * getGroup - get the Group object this SurveyQuestionFactory is associated with.
 	 *
-	 *	@return object	The Group object.
+	 * @return	object	The Group object.
 	 */
 	function &getGroup() {
 		return $this->Group;
 	}
 
 	/**
-	 *	getSurveyQuestion - get an array of Survey Question objects
-	 *                      for this Group and Survey id if survey_id is given.
+	 * getSurveyQuestion - get an array of Survey Question objects
+	 *                     for this Group and Survey id if survey_id is given.
 	 *
- 	 *	@return	array	The array of Survey Question objects.
+ 	 * @return	array	The array of Survey Question objects.
 	 */
 	function &getSurveyQuestions() {
 		/* We already have it */
diff --git a/src/common/survey/SurveyResponse.class.php b/src/common/survey/SurveyResponse.class.php
index 68a7f42..9161712 100644
--- a/src/common/survey/SurveyResponse.class.php
+++ b/src/common/survey/SurveyResponse.class.php
@@ -39,16 +39,16 @@ class SurveyResponse extends Error {
 	 */
 	var $Group;
 
-    /**
-     *  Constructor.
-     *
-     * @param $Group
-     * @param bool $arr
-     * @internal param \The $object Group object to which this Survey Response is associated.
-     * @internal param \The $int question_id.
-     * @internal param \The $array associative array of data.
-     * @return \SurveyResponse
-     */
+	/**
+	* Constructor.
+	*
+	* @param	$Group
+	* @param	bool	$arr
+	* @internal	param	\The $object Group object to which this Survey Response is associated.
+	* @internal	param	\The $int question_id.
+	* @internal	param	\The $array associative array of data.
+	* @return	\SurveyResponse
+	*/
 	function __construct(&$Group, $arr=false) {
 		$this->Error();
 		if (!$Group || !is_object($Group)) {
@@ -66,23 +66,23 @@ class SurveyResponse extends Error {
 		}
 	}
 
-    /**
-     *    create - use this function to create a survey response
-     *
-     * @param $user_id
-     * @param $survey_id
-     * @param $question_id
-     * @param $response
-     * @internal param \The $string question
-     * @internal param \The $int question type
-     *                      1: Radio Buttons 1-5
-     *                      2: Text Area
-     *                      3: Radio Buttons Yes/No
-     *                      4: Comment Only
-     *                      5: Text Field
-     *                      6: None
-     * @return    boolean    success.
-     */
+	/**
+	* create - use this function to create a survey response
+	*
+	* @param	$user_id
+	* @param	$survey_id
+	* @param	$question_id
+	* @param	$response
+	* @internal	param		\The $string question
+	* @internal	param		\The $int question type
+	*				1: Radio Buttons 1-5
+	*				2: Text Area
+	*				3: Radio Buttons Yes/No
+	*				4: Comment Only
+	*				5: Text Field
+	*				6: None
+	* @return	boolean		success.
+	*/
 	function create($user_id, $survey_id, $question_id, $response) {
 		$res = db_query_params ('INSERT INTO survey_responses (user_id,group_id,survey_id,question_id,response,post_date) VALUES ($1,$2,$3,$4,$5,$6)',
 					array ($user_id,
@@ -99,63 +99,63 @@ class SurveyResponse extends Error {
 	}
 
 	/**
-	 *	getGroup - get the Group object this SurveyResponse is associated with.
+	 * getGroup - get the Group object this SurveyResponse is associated with.
 	 *
-	 *	@return	object	The Group object.
+	 * @return	object	The Group object.
 	 */
 	function &getGroup() {
 		return $this->Group;
 	}
 
 	/**
-	 *	getUserID - Get the user id of this Survey response
+	 * getUserID - Get the user id of this Survey response
 	 *
-	 *	@return	int	The user_id
+	 * @return	int	The user_id
 	 */
 	function getUserID() {
 		return $this->data_array['user_id'];
 	}
 
 	/**
-	 *	getGroup - Get the group id of this Survey response
+	 * getGroup - Get the group id of this Survey response
 	 *
-	 *	@return	int	The group_id
+	 * @return	int	The group_id
 	 */
 	function getGroupID() {
 		return $this->data_array['group_id'];
 	}
 
 	/**
-	 *	getSurveyID - Get the survey id of this Survey response
+	 * getSurveyID - Get the survey id of this Survey response
 	 *
-	 *	@return	int	The survey_id
+	 * @return	int	The survey_id
 	 */
 	function getSurveyID() {
 		return $this->data_array['survey_id'];
 	}
 
 	/**
-	 *	getQuestionID - Get the question id of this Survey response
+	 * getQuestionID - Get the question id of this Survey response
 	 *
-	 *	@return	int	The question_id
+	 * @return	int	The question_id
 	 */
 	function getQuestionID() {
 		return $this->data_array['question_id'];
 	}
 
 	/**
-	 *	getUserID - Get the response of this Survey response
+	 * getUserID - Get the response of this Survey response
 	 *
-	 *	@return	int	The response
+	 * @return	int	The response
 	 */
 	function getResponse() {
 		return $this->data_array['response'];
 	}
 
 	/**
-	 *	getPostDate - Get the post date of this Survey response
+	 * getPostDate - Get the post date of this Survey response
 	 *
-	 *	@return	int	The post date
+	 * @return	int	The post date
 	 */
 	function getPostDate() {
 		return $this->data_array['post_date'];
diff --git a/src/common/survey/SurveyResponseFactory.class.php b/src/common/survey/SurveyResponseFactory.class.php
index 22fcfd8..c357b5e 100644
--- a/src/common/survey/SurveyResponseFactory.class.php
+++ b/src/common/survey/SurveyResponseFactory.class.php
@@ -66,8 +66,8 @@ class SurveyResponseFactory extends Error {
 	/**
 	 *  Constructor.
 	 *
-	 *	@param	object	$survey		The Survey object
-	 *	@param	object	$question	The Question object to which this survey Response is associated.
+	 * @param	object	$survey		The Survey object
+	 * @param	object	$question	The Question object to which this survey Response is associated.
 	 */
 	function __construct(&$survey, &$question ) {
 		$this->Error();
@@ -94,9 +94,9 @@ class SurveyResponseFactory extends Error {
 	}
 
 	/**
-	 *	getGroup - get the Group object this SurveyResponse is associated with.
+	 * getGroup - get the Group object this SurveyResponse is associated with.
 	 *
-	 *	@return object	The Group object.
+	 * @return	object	The Group object.
 	 */
 	function &getGroup() {
 		$Survey = $this->getSurvey();
@@ -104,28 +104,28 @@ class SurveyResponseFactory extends Error {
 	}
 
 	/**
-	 *	getSurvey - get the Survey object this SurveyResponse is associated with.
+	 * getSurvey - get the Survey object this SurveyResponse is associated with.
 	 *
-	 *	@return object	The Survey object.
+	 * @return	object	The Survey object.
 	 */
 	function &getSurvey() {
 		return $this->Survey;
 	}
 
 	/**
-	 *	getQuestion - get the Question object this SurveyResponse is associated with.
+	 * getQuestion - get the Question object this SurveyResponse is associated with.
 	 *
-	 *	@return object	The Question object.
+	 * @return	object	The Question object.
 	 */
 	function &getQuestion() {
 		return $this->Question;
 	}
 
 	/**
-	 *	getSurveyResponses - get an array of Survey Response objects
-	 *                           for the Survey and Question
+	 * getSurveyResponses - get an array of Survey Response objects
+	 *                      for the Survey and Question
 	 *
- 	 *	@return	array	The array of Survey Response objects.
+ 	 * @return	array	The array of Survey Response objects.
 	 */
 	function getSurveyResponses() {
 		/* We already have it */
@@ -157,10 +157,10 @@ class SurveyResponseFactory extends Error {
 	}
 
 	/**
-	 *	getSurveyAllResponses - get an array of Survey Response objects
-	 *		for the Survey and Question
+	 * getSurveyAllResponses - get an array of Survey Response objects
+	 *			for the Survey and Question
 	 *
-	 *	@return	array	The array of Survey Response objects.
+	 * @return	array	The array of Survey Response objects.
 	 */
 	function getSurveyAllResponses() {
 		/* We already have it */
@@ -188,23 +188,22 @@ class SurveyResponseFactory extends Error {
 	}
 
 	/**
-	 *	getNumberOfSurveyResponses - get the number of Survey Responses
+	 * getNumberOfSurveyResponses - get the number of Survey Responses
 	 *
- 	 *	@return	int      the number of survey responses
+ 	 * @return	int      the number of survey responses
 	 */
 	function getNumberOfSurveyResponses() {
 		$arr = $this->getSurveyResponses();
 		if (!$arr || !is_array($arr)) {
 			return 0;
 		}
-
 		return count($arr);
 	}
 
 	/**
-	 *	getResults - get the array of result for yes/no and 1-5 question
+	 * getResults - get the array of result for yes/no and 1-5 question
 	 *
-	 *	@return	int      the array of result
+	 * @return	int      the array of result
 	 *              for the yes/no question, it returns counts in arr[1] and arr[5];
 	 *              for the 1-5 question, it returns counts in arr[1], arr[1], ..., arr[5];
 	 *              for comments, we return arr[1], ...arr[n] with comments
@@ -255,9 +254,9 @@ class SurveyResponseFactory extends Error {
 	}
 
 	/**
-	 *	getDetailResults - get the array of result
+	 * getDetailResults - get the array of result
 	 *
-	 *	@return	int      the array of result
+	 * @return	int      the array of result
 	 *		return all responses for one survey
 	 */
 	function getDetailResults() {
diff --git a/src/www/survey/include/SurveyHTML.class.php b/src/www/survey/include/SurveyHTML.class.php
index fbb16a7..972dc41 100644
--- a/src/www/survey/include/SurveyHTML.class.php
+++ b/src/www/survey/include/SurveyHTML.class.php
@@ -103,9 +103,9 @@ class SurveyHTML extends Error {
 
 	/**
 	 * Show Add/Modify Question Forums
-	 * @param Survey $q	Question Question Object
-     * @return string
-     */
+	 * @param	Survey	$q	Question Question Object
+	 * @return	string
+	 */
 	function showAddQuestionForm( &$q ) {
 		global $group_id;
 
@@ -149,8 +149,8 @@ class SurveyHTML extends Error {
 
 	/**
 	 * Show Add/Modify Question Forums
-	 * @param Survey $s	Question Question Object
-	 * @return string
+	 * @param	Survey	$s	Question Question Object
+	 * @return	string
 	 */
 	function showAddSurveyForm( &$s) {
 		global $group_id;
@@ -288,6 +288,8 @@ class SurveyHTML extends Error {
 
 	/**
 	 * Show list of questions
+	 *
+	 * @return	string
 	 */
 	function showQuestions(&$questions) {
 		global $group_id;
@@ -466,6 +468,8 @@ class SurveyHTML extends Error {
 
 	/**
 	 * Show survey form - Show all forums of Survey
+	 *
+	 * @return	string
 	 */
 	function showSurveyForm(&$s) {
 		global $group_id;
@@ -569,11 +573,11 @@ class SurveyHTML extends Error {
 	/**
 	 * Show survey Result
 	 *
-	 *	@param object $sr a Survey Response Factory
-	 *	@param int $show_comment
-	 *	@param string $q_num
-	 *	@param int $show_graph
-	 *	@return string
+	 * @param	object	$sr a Survey Response Factory
+	 * @param	int	$show_comment
+	 * @param	string	$q_num
+	 * @param	int	$show_graph
+	 * @return	string
 	 */
 	function showResult(&$sr, $show_comment=0, $q_num="", $show_graph=0) {
 		global $group_id;
@@ -706,9 +710,9 @@ class SurveyHTML extends Error {
 	/**
 	 * split_str - works as str_split of PHP5 -  Converts a string to an array.
 	 *
-	 * @param string $str
-	 * @param int	$split_lengt	length of chunk
-	 * @return array array of chunks of the string
+	 * @param	string	$str
+	 * @param	int	$split_lengt	length of chunk
+	 * @return	array	array of chunks of the string
 	 */
 	function split_str($str, $split_lengt=1) {
 		$cnt = strlen($str);
@@ -721,10 +725,10 @@ class SurveyHTML extends Error {
 	/**
 	 * _makeBar - make Precentage bar as a cell in a table. Starts with <tr> and ends with </tr>
 	 *
-	 * @param string	$name		Name
-	 * @param int 		$percent	Percentage of the name
-	 * @param string	$color		Color
-	 * @return string
+	 * @param	string	$name		Name
+	 * @param	int	$percent	Percentage of the name
+	 * @param	string	$color		Color
+	 * @return	string
 	 */
 	function _makeBar($name, $percent, $color) {
 		$ret = '<tr><td width="30%">'.$name.'</td><td>';

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

Summary of changes:
 src/common/survey/SurveyFactory.class.php         |    2 +-
 src/common/survey/SurveyQuestion.class.php        |   56 +++++++-------
 src/common/survey/SurveyQuestionFactory.class.php |   14 ++--
 src/common/survey/SurveyResponse.class.php        |   82 ++++++++++-----------
 src/common/survey/SurveyResponseFactory.class.php |   41 +++++------
 src/www/survey/include/SurveyHTML.class.php       |   38 +++++-----
 6 files changed, 118 insertions(+), 115 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list