[Fusionforge-commits] FusionForge branch Branch_5_3 updated. 63eb0e61894669bdeb193b285c203a0b4dde6227

Franck VILLAUME nerville at fusionforge.org
Mon Jan 27 16:05:52 CET 2014


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, Branch_5_3 has been updated
       via  63eb0e61894669bdeb193b285c203a0b4dde6227 (commit)
       via  3acadaa2ebca08a3e1c48d9be6215c897fc4ed67 (commit)
      from  49e233eb1a148fd3ea2c52b1052aaac7ef21bf1a (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 63eb0e61894669bdeb193b285c203a0b4dde6227
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Mon Jan 27 16:04:27 2014 +0100

    pm: fix startdate for reporting coherent timetracking

diff --git a/src/common/reporting/Report.class.php b/src/common/reporting/Report.class.php
index fa98264..f442ab8 100644
--- a/src/common/reporting/Report.class.php
+++ b/src/common/reporting/Report.class.php
@@ -61,7 +61,9 @@ function Report() {
 }
 
 /**
- *	get the unix time that this install was setup.
+ * getMinDate - get the unix time that this install was setup.
+ *
+ * @return	int	the startdate
  */
 function getMinDate() {
 	if (!$this->site_start_date) {
@@ -72,6 +74,19 @@ function getMinDate() {
 	return $this->site_start_date;
 }
 
+/**
+ * setStartDate - force the start date for this report
+ *
+ * @param	int	$startdate	the epoch start date
+ */
+function setStartDate($startdate) {
+	$_startdate = $this->getMinDate();
+	if ($_startdate > $startdate) {
+		$startdate = $_startdate;
+	}
+	$this->site_start_date = $startdate;
+}
+
 function &getMonthStartArr() {
 	if (count($this->month_start_arr) < 1) {
 		$min_date=$this->getMinDate();
diff --git a/src/www/pm/mod_task.php b/src/www/pm/mod_task.php
index 4d33037..9782f9c 100644
--- a/src/www/pm/mod_task.php
+++ b/src/www/pm/mod_task.php
@@ -275,6 +275,7 @@ $report=new Report();
 if ($report->isError()) {
 	exit_error($report->getErrorMessage(),'pm');
 }
+$report->setStartDate($pt->ProjectGroup->Group->getStartDate());
 
 echo '<form id="time-tracking" action="/reporting/timeadd.php" method="post">
 	<input type="hidden" name="project_task_id" value="'.$project_task_id.'" />

commit 3acadaa2ebca08a3e1c48d9be6215c897fc4ed67
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Mon Jan 27 15:52:51 2014 +0100

    indent

diff --git a/src/common/include/Group.class.php b/src/common/include/Group.class.php
index 161c225..5f72aa9 100644
--- a/src/common/include/Group.class.php
+++ b/src/common/include/Group.class.php
@@ -161,7 +161,7 @@ function group_get_object_by_publicname($groupname) {
  * get_public_active_projects_asc() - Get a list of rows for public active projects (initially in trove/full_list)
  *
  * @param	int	$max_query_limit Optional Maximum number of rows to limit query length
- * @return  array List of public active projects
+ * @return	array	List of public active projects
  */
 function get_public_active_projects_asc($max_query_limit = -1) {
 
@@ -417,7 +417,7 @@ class Group extends Error {
 	 * @param	int	$type_id	Group type (1-project, 2-foundry).
 	 * @param	string	$unix_box	Machine on which group's home directory located.
 	 * @param	string	$http_domain	Domain which serves group's WWW.
-	 * @return	bool			status.
+	 * @return	bool	status.
 	 * @access	public
 	 */
 	function updateAdmin(&$user, $type_id, $unix_box, $http_domain) {
@@ -474,29 +474,29 @@ class Group extends Error {
 	 *
 	 * Unlike updateAdmin(), this function accessible to project admin.
 	 *
-	 * @param object	$user		User requesting operation (for access control).
-	 * @param string	$group_name
-	 * @param string	$homepage
-	 * @param string	$short_description
-	 * @param bool		$use_mail
-	 * @param bool		$use_survey
-	 * @param bool		$use_forum
-	 * @param bool		$use_pm
-	 * @param bool		$use_pm_depend_box
-	 * @param bool		$use_scm
-	 * @param bool		$use_news
-	 * @param bool		$use_docman
-	 * @param string	$new_doc_address
-	 * @param bool		$send_all_docs
-	 * @param int		$logo_image_id
-	 * @param bool		$use_ftp
-	 * @param bool		$use_tracker
-	 * @param bool		$use_frs
-	 * @param bool		$use_stats
-	 * @param $tags
-	 * @param bool		$use_activity
-	 * @param bool		$is_public		group is publicly accessible
-	 * @return    int    status.
+	 * @param	object	$user			User requesting operation (for access control).
+	 * @param	string	$group_name
+	 * @param	string	$homepage
+	 * @param	string	$short_description
+	 * @param	bool	$use_mail
+	 * @param	bool	$use_survey
+	 * @param	bool	$use_forum
+	 * @param	bool	$use_pm
+	 * @param	bool	$use_pm_depend_box
+	 * @param	bool	$use_scm
+	 * @param	bool	$use_news
+	 * @param	bool	$use_docman
+	 * @param	string	$new_doc_address
+	 * @param	bool	$send_all_docs
+	 * @param	int	$logo_image_id
+	 * @param	bool	$use_ftp
+	 * @param	bool	$use_tracker
+	 * @param	bool	$use_frs
+	 * @param	bool	$use_stats
+	 * @param	string	$tags
+	 * @param	bool	$use_activity
+	 * @param	bool	$is_public		group is publicly accessible
+	 * @return	int    status.
 	 * @access    public
 	 */
 	function update(&$user, $group_name, $homepage, $short_description, $use_mail, $use_survey, $use_forum,
@@ -834,19 +834,19 @@ class Group extends Error {
 	}
 
 	/**
-	 *	isTemplate - Simply returns the is_template flag from the database.
+	 * isTemplate - Simply returns the is_template flag from the database.
 	 *
-	 *	@return	boolean	is_template.
+	 * @return	boolean	is_template.
 	 */
 	function isTemplate() {
 		return $this->data_array['is_template'];
 	}
 
 	/**
-	 *	setAsTemplate - Set the template status of a project
+	 * setAsTemplate - Set the template status of a project
 	 *
-	 *	@param	boolean	$booleanparam	is_template.
-	 * @return bool
+	 * @param	boolean	$booleanparam	is_template.
+	 * @return	bool
 	 */
 	function setAsTemplate($booleanparam) {
 		db_begin();
@@ -864,9 +864,9 @@ class Group extends Error {
 	}
 
 	/**
-	 *	getTemplateProject - Return the project template this project is built from
+	 * getTemplateProject - Return the project template this project is built from
 	 *
-	 *	@return	object	The template project
+	 * @return	object	The template project
 	 */
 	function getTemplateProject() {
 		return group_get_object($this->data_array['built_from_template']);
@@ -947,7 +947,7 @@ class Group extends Error {
 	 * setSCMBox - the hostname of the scm box where this project is located.
 	 *
 	 * @param	string	$scm_box	The name of the new SCM_BOX
-	 * @return bool
+	 * @return	bool
 	 */
 	function setSCMBox($scm_box) {
 
@@ -992,7 +992,7 @@ class Group extends Error {
 	}
 
 	/**
-	 * getAdmins() - Get array of Admin user objects.
+	 * getAdmins - Get array of Admin user objects.
 	 *
 	 * @return	array	Array of User objects.
 	 */
@@ -1081,10 +1081,10 @@ class Group extends Error {
 	}
 
 	/**
-	 *	setUseSCM - Set the SCM usage
+	 * setUseSCM - Set the SCM usage
 	 *
-	 *	@param	boolean	$booleanparam	enabled/disabled
-	 * @return bool
+	 * @param	boolean	$booleanparam	enabled/disabled
+	 * @return	bool
 	 */
 	function setUseSCM($booleanparam) {
 		db_begin();
@@ -1102,7 +1102,7 @@ class Group extends Error {
 	}
 
 	/**
-	 *	usesMail - whether or not this group has opted to use mailing lists.
+	 * usesMail - whether or not this group has opted to use mailing lists.
 	 *
 	 * @return	boolean	uses_mail.
 	 */
@@ -1123,10 +1123,10 @@ class Group extends Error {
 	}
 
 	/**
-	 *	setUseMail - Set the mailing-list usage
+	 * setUseMail - Set the mailing-list usage
 	 *
-	 *	@param	boolean	$booleanparam	enabled/disabled
-	 * @return bool
+	 * @param	boolean	$booleanparam	enabled/disabled
+	 * @return	bool
 	 */
 	function setUseMail($booleanparam) {
 		db_begin();
@@ -1144,7 +1144,7 @@ class Group extends Error {
 	}
 
 	/**
-	 * 	usesNews - whether or not this group has opted to use news.
+	 * usesNews - whether or not this group has opted to use news.
 	 *
 	 * @return	boolean	uses_news.
 	 */
@@ -1183,10 +1183,10 @@ class Group extends Error {
 	}
 
 	/**
-	 *	setUseForum - Set the forum usage
+	 * setUseForum - Set the forum usage
 	 *
-	 *	@param	boolean	$booleanparam	enabled/disabled
-	 * @return bool
+	 * @param	boolean	$booleanparam	enabled/disabled
+	 * @return	bool
 	 */
 	function setUseForum($booleanparam) {
 		db_begin();
@@ -1204,7 +1204,7 @@ class Group extends Error {
 	}
 
 	/**
-	 *  usesStats - whether or not this group has opted to use stats.
+	 * usesStats - whether or not this group has opted to use stats.
 	 *
 	 * @return	boolean	uses_stats.
 	 */
@@ -1226,10 +1226,10 @@ class Group extends Error {
 	}
 
 	/**
-	 *	setUseFRS - Set the FRS usage
+	 * setUseFRS - Set the FRS usage
 	 *
-	 *	@param	boolean	$booleanparam	enabled/disabled
-	 * @return bool
+	 * @param	boolean	$booleanparam	enabled/disabled
+	 * @return	bool
 	 */
 	function setUseFRS($booleanparam) {
 		db_begin();
@@ -1247,7 +1247,7 @@ class Group extends Error {
 	}
 
 	/**
-	 *  usesTracker - whether or not this group has opted to use tracker.
+	 * usesTracker - whether or not this group has opted to use tracker.
 	 *
 	 * @return	boolean	uses_tracker.
 	 */
@@ -1260,12 +1260,12 @@ class Group extends Error {
 	}
 
 	/**
-	 *	setUseTracker - Set the tracker usage
+	 * setUseTracker - Set the tracker usage
 	 *
-	 *	@param	boolean	$booleanparam	enabled/disabled
-	 * @return bool
+	 * @param	boolean	$booleanparam	enabled/disabled
+	 * @return	bool
 	 */
-	function setUseTracker ($booleanparam) {
+	function setUseTracker($booleanparam) {
 		db_begin();
 		$booleanparam = $booleanparam ? 1 : 0;
 		$res = db_query_params ('UPDATE groups SET use_tracker=$1 WHERE group_id=$2',

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

Summary of changes:
 src/common/include/Group.class.php    |  108 ++++++++++++++++-----------------
 src/common/reporting/Report.class.php |   17 +++++-
 src/www/pm/mod_task.php               |    1 +
 3 files changed, 71 insertions(+), 55 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list