dblayer : correct the regression introduced in 2362

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2364 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2015-10-14 05:55:40 +00:00
parent d2bba22013
commit c421d73749

View File

@@ -480,7 +480,7 @@ class dblayer
}
// Check if the foreign keys constrains are valid before doing the insertion
foreach ($this->foreign as $foreign=>$data)
foreach ($this->foreign as $foreign=>$d)
{
if ($updatekey === false)
{
@@ -505,11 +505,11 @@ class dblayer
}
else
{
if (! array_key_exists ($foreign, $data))
if (! array_key_exists ($foreign, $d))
continue;
}
$table = $data[0];
$column = $data[1];
$table = $d[0];
$column = $d[1];
$req = "SELECT $this->sep$column$this->sep ".
"FROM $this->sep$this->tableprefix$table$this->sep ".
"WHERE $this->sep$column$this->sep=:".md5 ($column);