[Fusionforge-commits] FusionForge branch master updated. 152ff713d95a3417639259395282ed832a5d074e

Franck VILLAUME nerville at fusionforge.org
Tue Jan 14 17:56:21 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, master has been updated
       via  152ff713d95a3417639259395282ed832a5d074e (commit)
       via  ec88d615063bbeda3eb657862a0a780a7d0312cf (commit)
      from  045a09d9357275f524aaaefde331055ce2b2ed57 (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 152ff713d95a3417639259395282ed832a5d074e
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Tue Jan 14 17:54:11 2014 +0100

    fix [#174]: partial fix for pagination

diff --git a/src/www/pm/browse_task.php b/src/www/pm/browse_task.php
index 5400c98..7e2d9ca 100644
--- a/src/www/pm/browse_task.php
+++ b/src/www/pm/browse_task.php
@@ -6,6 +6,7 @@
  * Copyright 2002 GForge, LLC, Tim Perdue
  * Copyright 2010, FusionForge Team
  * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
+ * Copyright 2014, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -297,14 +298,14 @@ if ($rows < 1) {
 	*/
 	echo '<tr><td colspan="2">';
 	if ($offset > 0) {
-		echo util_make_link ('/pm/task.php?func=browse&group_project_id='.$group_project_id.'&group_id='.$group_id.'&offset='.($offset-50),'<strong>← '._('previous').'</strong>');
+		echo util_make_link ('/pm/task.php?func=browse&group_project_id='.$group_project_id.'&group_id='.$group_id.'&offset='.($offset-$paging),'<strong>← '._('previous').'</strong>');
 	} else {
 		echo ' ';
 	}
 	echo '</td><td> </td><td colspan="2">';
 
-	if ($rows==50) {
-		echo util_make_link ('/pm/task.php?func=browse&group_project_id='.$group_project_id.'&group_id='.$group_id.'&offset='.($offset+50),'<strong>'._('next').' →</strong></a>');
+	if ($pg->getTotalCount() > $offset + $paging) {
+		echo util_make_link ('/pm/task.php?func=browse&group_project_id='.$group_project_id.'&group_id='.$group_id.'&offset='.($offset+$paging),'<strong>'._('next').' →</strong></a>');
 	} else {
 		echo ' ';
 	}

commit ec88d615063bbeda3eb657862a0a780a7d0312cf
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Tue Jan 14 17:53:12 2014 +0100

    pm: indent

diff --git a/src/common/pm/ProjectGroup.class.php b/src/common/pm/ProjectGroup.class.php
index 7678283..27fe6eb 100644
--- a/src/common/pm/ProjectGroup.class.php
+++ b/src/common/pm/ProjectGroup.class.php
@@ -85,17 +85,17 @@ class ProjectGroup extends Error {
 	var $categories;
 	var $technicians;
 
-    /**
-     * Constructor.
-     *
-     * @param $Group
-     * @param bool $group_project_id
-     * @param bool $arr
-     * @internal param \The $object Group object to which this forum is associated.
-     * @internal param \The $int group_project_id.
-     * @internal param \The $array associative array of data.
-     * @return \ProjectGroup
-     */
+	/**
+	 * Constructor.
+	 *
+	 * @param	$Group
+	 * @param	bool	$group_project_id
+	 * @param	bool	$arr
+	 * @internal	param	\The $object Group object to which this forum is associated.
+	 * @internal	param	\The $int group_project_id.
+	 * @internal	param	\The $array associative array of data.
+	 * @return	\ProjectGroup
+	 */
 	function ProjectGroup(&$Group, $group_project_id = false, $arr = false) {
 		$this->Error();
 		if (!$Group || !is_object($Group)) {
@@ -135,7 +135,7 @@ class ProjectGroup extends Error {
 	 * create - create a new ProjectGroup in the database.
 	 *
 	 * @param	string	$project_name		The project name.
-	 * @param	string	$description		The project description.	 * @param	string	The email address to send new notifications to.
+	 * @param	string	$description		The project description.	 
 	 * @param	string	$send_all_posts_to	The email address to send new notifications to.
 	 * @return	bool	success.
 	 */
@@ -281,7 +281,7 @@ class ProjectGroup extends Error {
 	 *
 	 * @return	object	Database result set.
 	 */
-	function getCategories () {
+	function getCategories() {
 		if (!$this->categories) {
 			$this->categories = db_query_params('SELECT category_id,category_name FROM project_category WHERE group_project_id=$1',
 							    array($this->getID()));
@@ -353,7 +353,7 @@ class ProjectGroup extends Error {
 	/**
 	 * delete - delete this subproject and all its related data.
 	 *
-	 * @param	bool	$sure			I'm Sure.
+	 * @param	bool	$sure		I'm Sure.
 	 * @param	bool	$really_sure	I'm REALLY sure.
 	 * @return	bool	true/false;
 	 */
diff --git a/src/common/pm/ProjectTaskFactory.class.php b/src/common/pm/ProjectTaskFactory.class.php
index 90d810d..954d2b5 100644
--- a/src/common/pm/ProjectTaskFactory.class.php
+++ b/src/common/pm/ProjectTaskFactory.class.php
@@ -52,8 +52,8 @@ class ProjectTaskFactory extends Error {
 	/**
 	 *  Constructor.
 	 *
-	 *	@param	ProjectGroup $ProjectGroup The ProjectGroup object to which this ProjectTask is associated.
-	 *	@return	boolean	success.
+	 * @param	ProjectGroup	$ProjectGroup	The ProjectGroup object to which this ProjectTask is associated.
+	 * @return	boolean		success.
 	 */
 	function ProjectTaskFactory(&$ProjectGroup) {
 		$this->Error();
@@ -75,14 +75,14 @@ class ProjectTaskFactory extends Error {
 	/**
 	 * setup - sets up limits and sorts before you call getTasks().
 	 *
-	 * @param  int       $offset        The offset - number of rows to skip.
-	 * @param  string    $order         The way to order - ASC or DESC.
-	 * @param  int       $max_rows      The max number of rows to return.
-	 * @param  string    $set           Whether to set these prefs into the user_prefs table - use "custom".
-	 * @param  int       $_assigned_to  Include this param if you want to limit to a certain assignee.
-	 * @param  int       $_status       Include this param if you want to limit to a certain category.
-	 * @param            $_category_id
-	 * @param  string    $_view
+	 * @param	int	$offset		The offset - number of rows to skip.
+	 * @param	string	$order		The way to order - ASC or DESC.
+	 * @param	int	$max_rows	The max number of rows to return.
+	 * @param	string	$set		Whether to set these prefs into the user_prefs table - use "custom".
+	 * @param	int	$_assigned_to	Include this param if you want to limit to a certain assignee.
+	 * @param	int	$_status	Include this param if you want to limit to a certain category.
+	 * @param	$_category_id
+	 * @param	string    $_view
 	 */
 	function setup($offset,$order,$max_rows,$set,$_assigned_to,$_status,$_category_id,$_view='') {
 //echo "<br />offset: $offset| order: $order|max_rows: $max_rows|_assigned_to: $_assigned_to|_status: $_status|_category_id: $_category_id +";
@@ -148,7 +148,7 @@ class ProjectTaskFactory extends Error {
 	/**
 	 * getTasks - get an array of ProjectTask objects.
 	 *
-	 * @return ProjectTask[] The array of ProjectTask objects.
+	 * @return	array	ProjectTask[]	The array of ProjectTask objects.
 	 */
 	function &getTasks() {
 		if ($this->project_tasks) {

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

Summary of changes:
 src/common/pm/ProjectGroup.class.php       |   28 ++++++++++++++--------------
 src/common/pm/ProjectTaskFactory.class.php |   22 +++++++++++-----------
 src/www/pm/browse_task.php                 |    7 ++++---
 3 files changed, 29 insertions(+), 28 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list