[Fusionforge-commits] r13856 - trunk/src/plugins/projects_hierarchy/common

Franck VILLAUME nerville at fusionforge.org
Thu Jul 28 10:40:37 CEST 2011


Author: nerville
Date: 2011-07-28 10:40:37 +0200 (Thu, 28 Jul 2011)
New Revision: 13856

Modified:
   trunk/src/plugins/projects_hierarchy/common/projects_hierarchyPlugin.class.php
Log:
fix son_box recurcive skipped ids

Modified: trunk/src/plugins/projects_hierarchy/common/projects_hierarchyPlugin.class.php
===================================================================
--- trunk/src/plugins/projects_hierarchy/common/projects_hierarchyPlugin.class.php	2011-07-28 08:36:34 UTC (rev 13855)
+++ trunk/src/plugins/projects_hierarchy/common/projects_hierarchyPlugin.class.php	2011-07-28 08:40:37 UTC (rev 13856)
@@ -641,16 +641,9 @@
 	 * @access	public
 	 */
 	function son_box($group_id, $name, $selected = 'xzxzxz') {
-		$sons = $this->getFamily($group_id, 'child', true, 'any');
-		$parent = $this->getFamily($group_id, 'parent', true, 'any');
-		$skipped = array();
+		$sons = $this->getFamilyID($group_id, 'child', true, 'any');
+		$parent = $this->getFamilyID($group_id, 'parent', true, 'any');
 		$family = array_merge($parent, $sons);
-		if (sizeof($family)) {
-			//TODO : need to fix this. We only get parent here....
-			foreach ($family as $element) {
-				$skipped[] = $element[0];
-			}
-		}
 		$son = db_query_params('SELECT group_id, group_name FROM groups
 					WHERE status = $1
 					AND group_id != $2
@@ -659,7 +652,7 @@
 					AND group_id IN (select group_id from group_plugin,plugins where group_plugin.plugin_id = plugins.plugin_id and plugins.plugin_name = $4);',
 					array('A',
 						$group_id,
-						db_int_array_to_any_clause($skipped),
+						db_int_array_to_any_clause($family),
 						$this->name));
 		return html_build_select_box($son, $name, $selected, false);
 	}




More information about the Fusionforge-commits mailing list