N°4211 - Remove DBObject::Reload calls added in 3.0.0 - Fix Highlight code (computed only for lifecycle and stopwatch)

This commit is contained in:
Eric Espie
2021-09-14 15:01:22 +02:00
parent 2ab0fab051
commit 45dc79f5af

View File

@@ -948,10 +948,9 @@ abstract class DBObject implements iDisplay
*/
protected function ComputeHighlightCode()
{
// First if the state defines a HiglightCode, apply it
$sState = $this->GetState();
if ($sState != '')
if (MetaModel::HasLifecycle(get_class($this)))
{
$sState = $this->GetState();
$sCode = MetaModel::GetHighlightCode(get_class($this), $sState);
$this->SetHighlightCode($sCode);
}