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
This commit is contained in:
2015-03-22 04:26:16 +00:00
parent 8897e82170
commit f7c0395a31

View File

@@ -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;
}