Finalized the email error management:

- errors in OQL
- no recipient
- smtp server response (windows only)
- test option (status)
- test page

SVN:trunk[270]
This commit is contained in:
Romain Quetiez
2010-01-18 16:42:00 +00:00
parent 3276961866
commit aa6d6029d9
13 changed files with 585 additions and 102 deletions

View File

@@ -522,14 +522,27 @@ abstract class DBObject
// Note: checks the values and consistency
public function CheckToInsert()
{
$aIssues = array();
foreach(MetaModel::ListAttributeDefs(get_class($this)) as $sAttCode=>$oAttDef)
{
if (!$this->CheckValue($sAttCode)) return false;
if (!$this->CheckValue($sAttCode))
{
$aIssues[$sAttCode] = array(
'issue' => 'unexpected value'
);
}
}
if (!$this->CheckConsistency()) return false;
return true;
if (count($aIssues) > 0)
{
return array(false, $aIssues);
}
if (!$this->CheckConsistency())
{
return array(false, $aIssues);
}
return array(true, $aIssues);
}
// check if it is allowed to update the existing object into the database
// a displayable error is returned
// Note: checks the values and consistency