Log REST/JSON calls (config: 'log_rest_service' => true ; stored as EventRestService)

SVN:trunk[3688]
This commit is contained in:
Romain Quetiez
2015-08-19 14:35:08 +00:00
parent 8b5faf6b66
commit 3ba2c3d657
18 changed files with 280 additions and 13 deletions

View File

@@ -423,6 +423,17 @@ abstract class DBObject implements iDisplay
return true;
}
public function SetTrim($sAttCode, $sValue)
{
$oAttDef = MetaModel::GetAttributeDef(get_class($this), $sAttCode);
$iMaxSize = $oAttDef->GetMaxSize();
if ($iMaxSize && (strlen($sValue) > $iMaxSize))
{
$sValue = substr($sValue, 0, $iMaxSize);
}
$this->Set($sAttCode, $sValue);
}
public function GetLabel($sAttCode)
{
$oAttDef = MetaModel::GetAttributeDef(get_class($this), $sAttCode);