From 5bddf1e468466abcf5394e377baec04ae6e1baad Mon Sep 17 00:00:00 2001 From: alangrafu <alvaro@graves.cl> Date: Mon, 12 Sep 2011 01:04:31 -0700 Subject: [PATCH] Small syntactic sugar when results row is only 1 Instead of iterate over a row like {0.000000or row in r.filename}{{r.value.variable}}{4.659039e-321ndfor} when there is only one row, it is possible to access the values from {{r.filename.value.variable}} --- classes/Utils.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/classes/Utils.php b/classes/Utils.php index 39405b2f..e4695317 100644 --- a/classes/Utils.php +++ b/classes/Utils.php @@ -87,6 +87,9 @@ class Utils{ if(sizeof($row) >0){ array_push($obj, $row); } + if(sizeof($aux) == 1){ + return $row; + } } return $obj; } -- GitLab