[Fusionforge-commits] r18565 - trunk/src/common/tracker

Marc-Etienne VARGENAU vargenau at fusionforge.org
Wed Dec 4 12:51:52 CET 2013


Author: vargenau
Date: 2013-12-04 12:51:51 +0100 (Wed, 04 Dec 2013)
New Revision: 18565

Modified:
   trunk/src/common/tracker/ArtifactType.class.php
Log:
choiceid --> choice_id

Modified: trunk/src/common/tracker/ArtifactType.class.php
===================================================================
--- trunk/src/common/tracker/ArtifactType.class.php	2013-12-04 11:43:59 UTC (rev 18564)
+++ trunk/src/common/tracker/ArtifactType.class.php	2013-12-04 11:51:51 UTC (rev 18565)
@@ -723,34 +723,34 @@
 	/**
 	 * getElementName - get the name of a particular element.
 	 *
-	 * @param $choiceid
+	 * @param $choice_id
 	 * @return string    The name.
 	 */
-	function getElementName($choiceid) {
-		if (!$choiceid) {
+	function getElementName($choice_id) {
+		if (!$choice_id) {
 			return '';
 		}
-		if (is_array($choiceid)) {
-			$choiceid = implode(',', array_map('intval', $choiceid));
+		if (is_array($choice_id)) {
+			$choice_id = implode(',', array_map('intval', $choice_id));
 		} else {
-			$choiceid = intval($choiceid);
+			$choice_id = intval($choice_id);
 		}
-		if ($choiceid == 100) {
+		if ($choice_id == 100) {
 			return 'None';
 		}
-		if (!isset($this->element_name["$choiceid"])) {
+		if (!isset($this->element_name[$choice_id])) {
 			$res = db_query_params('SELECT element_id,extra_field_id,element_name
 				FROM artifact_extra_field_elements
 				WHERE element_id = ANY ($1)',
-						array(db_int_array_to_any_clause(explode(',', $choiceid))));
+						array(db_int_array_to_any_clause(explode(',', $choice_id))));
 			if (db_numrows($res) > 1) {
 				$arr = util_result_column_to_array($res, 2);
-				$this->element_name[$choiceid] = implode(',', $arr);
+				$this->element_name[$choice_id] = implode(',', $arr);
 			} else {
-				$this->element_name[$choiceid] = db_result($res, 0, 'element_name');
+				$this->element_name[$choice_id] = db_result($res, 0, 'element_name');
 			}
 		}
-		return $this->element_name[$choiceid];
+		return $this->element_name[$choice_id];
 	}
 
 	/**
@@ -763,10 +763,10 @@
 		if (!$choice_id) {
 			return 0;
 		}
-		if (is_array($choiceid)) {
-			$choiceid = implode(',',$choiceid);
+		if (is_array($choice_id)) {
+			$choice_id = implode(',',$choice_id);
 		}
-		if ($choiceid == 100) {
+		if ($choice_id == 100) {
 			return 0;
 		}
 		if (!$this->element_status[$choice_id]) {




More information about the Fusionforge-commits mailing list