dblayeroo : update the syntax and change a checkRealTypes method name
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@4622 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -2890,7 +2890,7 @@ class dblayeroo
|
|||||||
$this->debugLog ("Entering checkValues (",$update,")");
|
$this->debugLog ("Entering checkValues (",$update,")");
|
||||||
$update = !! $update;
|
$update = !! $update;
|
||||||
$values = $this->setValues;
|
$values = $this->setValues;
|
||||||
$errors = $this->checkRealType ($values, $update);
|
$errors = $this->checkRealTypes ($values, $update);
|
||||||
if (count ($errors))
|
if (count ($errors))
|
||||||
$this->DBException (reset ($errors));
|
$this->DBException (reset ($errors));
|
||||||
$errors = $this->verify ($values, $update);
|
$errors = $this->verify ($values, $update);
|
||||||
@@ -2909,12 +2909,13 @@ class dblayeroo
|
|||||||
* @param boolean|null $allowEmpty Allow the "not null" to not be set
|
* @param boolean|null $allowEmpty Allow the "not null" to not be set
|
||||||
* @return array empty array if no error
|
* @return array empty array if no error
|
||||||
*/
|
*/
|
||||||
public function checkRealType ($values, $allowEmpty = false)
|
public function checkRealTypes ($values, $allowEmpty = false)
|
||||||
// {{{
|
// {{{
|
||||||
{
|
{
|
||||||
$this->debugLog ("Entering checkRealType (",$values,",",$allowEmpty,")");
|
$this->debugLog ("Entering checkRealTypes (",$values,",",$allowEmpty,")");
|
||||||
if (! is_array ($values))
|
if (! is_array ($values))
|
||||||
$this->DBException ("Invalid checkRealType provided : not an array", 500);
|
$this->DBException ("Invalid checkRealTypes provided : not an array",
|
||||||
|
500);
|
||||||
$errors = array ();
|
$errors = array ();
|
||||||
foreach ($this->fields as $field => $params)
|
foreach ($this->fields as $field => $params)
|
||||||
{
|
{
|
||||||
@@ -2948,7 +2949,7 @@ class dblayeroo
|
|||||||
$errors[$field] = $res;
|
$errors[$field] = $res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->debugLog ("End checkRealType (", $values, ",", $allowEmpty, ") : ",
|
$this->debugLog ("End checkRealTypes (", $values, ",", $allowEmpty, ") : ",
|
||||||
$errors);
|
$errors);
|
||||||
return $errors;
|
return $errors;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user