mirror of
https://github.com/Combodo/iTop.git
synced 2026-03-08 02:24:12 +01:00
Log REST/JSON calls (config: 'log_rest_service' => true ; stored as EventRestService)
SVN:trunk[3688]
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user