[Fusionforge-commits] r10440 - in trunk/src/common: forum pm tracker

Alain Peyrat aljeux at libremir.placard.fr.eu.org
Thu Sep 9 21:06:06 CEST 2010


Author: aljeux
Date: 2010-09-09 21:06:06 +0200 (Thu, 09 Sep 2010)
New Revision: 10440

Modified:
   trunk/src/common/forum/ForumMessage.class.php
   trunk/src/common/pm/ProjectTask.class.php
   trunk/src/common/tracker/ArtifactFile.class.php
   trunk/src/common/tracker/ArtifactType.class.php
Log:
Fix PHP warnings

Modified: trunk/src/common/forum/ForumMessage.class.php
===================================================================
--- trunk/src/common/forum/ForumMessage.class.php	2010-09-09 19:06:00 UTC (rev 10439)
+++ trunk/src/common/forum/ForumMessage.class.php	2010-09-09 19:06:06 UTC (rev 10440)
@@ -409,7 +409,7 @@
 			$this->setError(_('ForumMessage::fetchData() Invalid MessageID').db_error());
 			return false;
 		}
-		$this->data_array =& db_fetch_array($res);
+		$this->data_array = db_fetch_array($res);
 		db_free_result($res);
 		return true;
 	}
@@ -613,7 +613,7 @@
 	 *	@return boolean success.
 	 */
 	function sendNotice($has_attach=false) {
-		$ids =& $this->Forum->getMonitoringIDs();
+		$ids = $this->Forum->getMonitoringIDs();
 
 		$recipients = array ();
 		foreach ($ids as $id) {

Modified: trunk/src/common/pm/ProjectTask.class.php
===================================================================
--- trunk/src/common/pm/ProjectTask.class.php	2010-09-09 19:06:00 UTC (rev 10439)
+++ trunk/src/common/pm/ProjectTask.class.php	2010-09-09 19:06:06 UTC (rev 10440)
@@ -717,9 +717,9 @@
 		if (!$arr_ || empty($arr_)) {
 			$arr_=array('100'=>PM_LINK_DEFAULT);
 		}
-		$arr =& array_keys($arr_);
+		$arr = array_keys($arr_);
 		//get existing dependencies to diff against
-		$arr2 =& array_keys($this->getDependentOn());
+		$arr2 = array_keys($this->getDependentOn());
 
 		if (count($arr) || count($arr2)) {
 			$add_arr = array_values (array_diff ($arr, $arr2));
@@ -770,8 +770,7 @@
 	 *  Here we are converting an array like array(1,5,9,77) to array(1=>SS,5=>SF,9=>FS,77=>SS)
 	 */
 	function &convertDependentOn($arr) {
-//echo "<p>Convert Dep0: ".print_r($arr);
-		$deps =& $this->getDependentOn();
+		$deps = $this->getDependentOn();
 		for ($i=0; $i<count($arr); $i++) {
 			if ($deps[$arr[$i]]) {
 				//use existing link_type if it exists
@@ -781,7 +780,6 @@
 				$new[$arr[$i]]=PM_LINK_DEFAULT;
 			}	
 		}
-//echo "<p>Convert Dep1: ".print_r($new);
 		return $new;
 	}
 
@@ -791,7 +789,7 @@
 	 *	@return	array	The array of project_task_id's in this format: 
 	 *  array($id=>$link_type,id2=>link_type2).
 	 */
-	function &getDependentOn() {
+	function getDependentOn() {
 		if (!$this->getID()) {
 			$this->dependon = array();
 			return $this->dependon;
@@ -819,11 +817,11 @@
 	 * @returns	boolean	success.
 	 */
 	function setAssignedTo(&$arr) {
-		$arr2 =& $this->getAssignedTo();
+		$arr2 = $this->getAssignedTo();
 		$this->assignedto =& $arr;
 
 		//If no one is assigned, then assign it to "100" - NOBODY
-		if (count($arr) < 1 || ((count($arr)==1) && ($arr[0]==''))) {
+		if (!$arr || count($arr) < 1 || ((count($arr)==1) && ($arr[0]==''))) {
 			$arr=array('100');
 		}
 		if (count($arr) || count($arr2)) {
@@ -1108,7 +1106,7 @@
 		if ($send_task_email===false) {
 			return true;
 		}
-		$ids =& $this->getAssignedTo();
+		$ids = $this->getAssignedTo();
 
 		//
 		//	See if there is anyone to send messages to

Modified: trunk/src/common/tracker/ArtifactFile.class.php
===================================================================
--- trunk/src/common/tracker/ArtifactFile.class.php	2010-09-09 19:06:00 UTC (rev 10439)
+++ trunk/src/common/tracker/ArtifactFile.class.php	2010-09-09 19:06:06 UTC (rev 10440)
@@ -219,7 +219,7 @@
 			$this->setError('ArtifactFile: Invalid ArtifactFile ID');
 			return false;
 		}
-		$this->data_array =& db_fetch_array($res);
+		$this->data_array = db_fetch_array($res);
 		db_free_result($res);
 		return true;
 	}

Modified: trunk/src/common/tracker/ArtifactType.class.php
===================================================================
--- trunk/src/common/tracker/ArtifactType.class.php	2010-09-09 19:06:00 UTC (rev 10439)
+++ trunk/src/common/tracker/ArtifactType.class.php	2010-09-09 19:06:06 UTC (rev 10440)
@@ -673,7 +673,7 @@
 			//
 			$resel = db_query_params ('SELECT * FROM artifact_extra_field_elements WHERE extra_field_id=$1',
 						  array ($ef['extra_field_id'])) ;
-			while ($el =& db_fetch_array($resel)) {
+			while ($el = db_fetch_array($resel)) {
 				//new element
 				$nel = new ArtifactExtraFieldElement($nef);
 				if (!$nel->create( addslashes(util_unconvert_htmlspecialchars($el['element_name'])), $el['status_id'] )) {




More information about the Fusionforge-commits mailing list