From f7c0395a31867b4995f205cf102b661fb8c6fdca Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Sun, 22 Mar 2015 04:26:16 +0000 Subject: [PATCH] routeSQL : removing the $datas word : it should be $data git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2043 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- routeSQL.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/routeSQL.php b/routeSQL.php index 2ef00af..955c251 100644 --- a/routeSQL.php +++ b/routeSQL.php @@ -336,7 +336,7 @@ class routeSQL if ($this->chained !== null) $foreignSelect = array (array ($this->chainedForeign, $chain)); if ($search === "") - $datas = $this->objectDB->read (null, array_keys($titles), null, null, + $data = $this->objectDB->read (null, array_keys($titles), null, null, $foreignSelect); else { @@ -354,11 +354,11 @@ class routeSQL $s = "$s%"; $criteria[] = array ($column, "$s", "LIKE"); } - $datas = $this->objectDB->read ($criteria, array_keys ($titles), null, + $data = $this->objectDB->read ($criteria, array_keys ($titles), null, true, $foreignSelect); } - $this->renderrest ($extension, $datas); + $this->renderrest ($extension, $data); }); $route->post ("rest/".$this->url_prefix."(\.{extension})?", @@ -646,7 +646,7 @@ class routeSQL if ($this->chained !== null) $foreignSelect = array (array ($this->chainedForeign, $chain)); if ($search === "") - $datas = $this->objectDB->read (null, array_keys($titles), null, null, + $data = $this->objectDB->read (null, array_keys($titles), null, null, $foreignSelect); else { @@ -664,10 +664,10 @@ class routeSQL $s = "$s%"; $criteria[] = array ($column, "$s", "LIKE"); } - $datas = $this->objectDB->read ($criteria, array_keys ($titles), null, + $data = $this->objectDB->read ($criteria, array_keys ($titles), null, true, $foreignSelect); } - $nbentries = count ($datas); + $nbentries = count ($data); if ($num > 1000) $route->redirect ("/".str_replace ("{chain}", $chain, $this->url_prefix) ."?page=$page&num=1000&search=$search", ""); @@ -762,7 +762,7 @@ class routeSQL { $i = 1; $odd = "odd"; - foreach ($datas as $line) + foreach ($data as $line) { if ($i <= (($page-1)*$num) || $i > (($page-1)*$num + $num)) { @@ -1354,10 +1354,10 @@ class routeSQL Return FALSE in the other cases */ public function keyexists ($id) { - $datas = $this->objectDB->read (array (array ($this->objectDB->primary, + $data = $this->objectDB->read (array (array ($this->objectDB->primary, $id))); - if (count ($datas) > 0) - return $datas[0]; + if (count ($data) > 0) + return $data[0]; return FALSE; }