dblayeroo : valid the select without the table name. Regression introduced last commit
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3496 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -1599,7 +1599,9 @@ class dblayeroo
|
||||
if (isset ($this->fieldsTmp))
|
||||
$displayColumns = implode (",", array_keys ($this->fieldsTmp));
|
||||
else
|
||||
$displayColumns = "*";
|
||||
$displayColumns = $this->sep.
|
||||
implode ($this->sep.",".$this->sep, array_keys ($this->fields)).
|
||||
$this->sep;
|
||||
}
|
||||
$sql .= " $displayColumns FROM $this->sep$this->tableprefix".
|
||||
"$this->table$this->sep";
|
||||
@@ -1957,7 +1959,7 @@ class dblayeroo
|
||||
// overwrite with the same value)
|
||||
// If it is not the same, produce an error
|
||||
$objTmp->whereAdd ($this->primary, "!=",
|
||||
$resUpdate[0][$this->primary]);
|
||||
$resUpdate[0][$this->table.".".$this->primary]);
|
||||
}
|
||||
if (count ($errors) == 0 && count ($objTmp->execute ()))
|
||||
$this->DBException (dgettext ("domframework",
|
||||
@@ -2043,6 +2045,8 @@ class dblayeroo
|
||||
// the filled value)
|
||||
if (isset ($this->fieldsTmp))
|
||||
$columns = array_keys ($this->fieldsTmp);
|
||||
elseif (count ($this->displayColumn))
|
||||
$columns = $this->displayColumn;
|
||||
else
|
||||
$columns = array_keys ($this->fields);
|
||||
foreach ($result as $rownb=>$row)
|
||||
@@ -2056,9 +2060,17 @@ class dblayeroo
|
||||
"integer")
|
||||
$val = intval ($val);
|
||||
}
|
||||
elseif (isset ($this->fields))
|
||||
elseif (count ($this->displayColumn))
|
||||
{
|
||||
if (strtolower ($this->fields[$columns[$colNb]][0]) === "integer")
|
||||
$fieldWithoutTable = substr ($columns[$colNb],
|
||||
strlen ($this->sep.$this->table.$this->sep.".".$this->sep), -1);
|
||||
if (strtolower ($this->fields[$fieldWithoutTable][0]) === "integer")
|
||||
$val = intval ($val);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (strtolower ($this->fields[$columns[$colNb]][0]) ===
|
||||
"integer")
|
||||
$val = intval ($val);
|
||||
}
|
||||
$colName = str_replace ($this->sep, "", $columns[$colNb]);
|
||||
|
||||
Reference in New Issue
Block a user