[evolvis-commits] r18690: ensure JSON fields are integral if they should be

mirabilos at evolvis.org mirabilos at evolvis.org
Thu Oct 4 17:59:48 CEST 2012


Author: mirabilos
Date: 2012-10-04 17:59:48 +0200 (Thu, 04 Oct 2012)
New Revision: 18690

Modified:
   trunk/gforge_base/evolvisforge-5.1/src/www/tracker/t_lookup.php
Log:
ensure JSON fields are integral if they should be

Modified: trunk/gforge_base/evolvisforge-5.1/src/www/tracker/t_lookup.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/tracker/t_lookup.php	2012-10-04 15:59:44 UTC (rev 18689)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/tracker/t_lookup.php	2012-10-04 15:59:48 UTC (rev 18690)
@@ -125,6 +125,19 @@
 			$xinfo[$k] = $v;
 			break;
 
+		case 'artifact_id':
+		case 'assigned_to':
+		case 'close_date':
+		case 'group_artifact_id':
+		case 'group_id':
+		case 'last_modified_date':
+		case 'open_date':
+		case 'priority':
+		case 'status_id':
+		case 'submitted_by':
+			$xinfo[$k] = (int)$v;
+			break;
+
 		default:
 			$xinfo[$k] = $v;
 			break;
@@ -145,7 +158,8 @@
 		$taskcount = db_numrows($ah->getRelatedTasks());
 		if ($taskcount >= 1) for ($i = 0; $i < $taskcount; ++$i) {
 			$taskinfo = db_fetch_array($ah->relatedtasks, $i);
-			$xinfo['_related_tasks'][] = $taskinfo['project_task_id'];
+			$xinfo['_related_tasks'][] =
+			    (int)$taskinfo['project_task_id'];
 		}
 	}
 }



More information about the evolvis-commits mailing list