[Fusionforge-commits] r9602 - trunk/gforge/common/pm

Roland Mas lolando at libremir.placard.fr.eu.org
Mon Apr 26 10:53:02 CEST 2010


Author: lolando
Date: 2010-04-26 10:52:57 +0200 (Mon, 26 Apr 2010)
New Revision: 9602

Modified:
   trunk/gforge/common/pm/ProjectTaskFactory.class.php
Log:
Save tasks filtering and ordering preferences per subproject, not per project

Modified: trunk/gforge/common/pm/ProjectTaskFactory.class.php
===================================================================
--- trunk/gforge/common/pm/ProjectTaskFactory.class.php	2010-04-24 09:52:29 UTC (rev 9601)
+++ trunk/gforge/common/pm/ProjectTaskFactory.class.php	2010-04-26 08:52:57 UTC (rev 9602)
@@ -101,14 +101,14 @@
 			if ($order=='project_task_id' || $order=='percent_complete'
 				|| $order=='summary' || $order=='start_date' || $order=='end_date' || $order=='priority') {
 				if (session_loggedin()) {
-					$u->setPreference('pm_task_order', $order);
+					$u->setPreference('pm_task_order'.$this->ProjectGroup->getID(), $order);
 				}
 			} else {
 				$order = 'project_task_id';
 			}
 		} else {
 			if (session_loggedin()) {
-				$order = $u->getPreference('pm_task_order');
+				$order = $u->getPreference('pm_task_order'.$this->ProjectGroup->getID());
 			}
 		}
 		if (!$order) {
@@ -121,13 +121,12 @@
 				if this custom set is different than the stored one, reset preference
 			*/
 			$pref_=$_assigned_to.'|'.$_status.'|'.$_category_id.'|'.$_view;
-			if (session_loggedin() && ($pref_ != $u->getPreference('pm_brow_cust'.$this->ProjectGroup->Group->getID()))) {
-				//echo 'setting pref';
-				$u->setPreference('pm_brow_cust'.$this->ProjectGroup->Group->getID(),$pref_);
+			if (session_loggedin() && ($pref_ != $u->getPreference('pm_brow_cust'.$this->ProjectGroup->getID()))) {
+				$u->setPreference('pm_brow_cust'.$this->ProjectGroup->getID(),$pref_);
 			}
 		} else {
 			if (session_loggedin()) {
-				if ($pref_=$u->getPreference('pm_brow_cust'.$this->ProjectGroup->Group->getID())) {
+				if ($pref_=$u->getPreference('pm_brow_cust'.$this->ProjectGroup->getID())) {
 					$prf_arr=explode('|',$pref_);
 					$_assigned_to=$prf_arr[0];
 					$_status=$prf_arr[1];




More information about the Fusionforge-commits mailing list