Do not add the stat DOM if the stat is not available

This commit is contained in:
Hadi Nategh 2019-06-05 10:22:14 +02:00
parent 534edde475
commit e87655394d

View File

@ -638,8 +638,8 @@ abstract class Framework extends Framework\Extra
return '<span title="'.Accounts::format_username().'" class="avatar"><img src="'.Egw::link('/api/avatar.php', array( return '<span title="'.Accounts::format_username().'" class="avatar"><img src="'.Egw::link('/api/avatar.php', array(
'account_id' => $GLOBALS['egw_info']['user']['account_id'], 'account_id' => $GLOBALS['egw_info']['user']['account_id'],
)).'"/>'. )).'"/>'.(!empty($stat) ?
'<span class="'.$stat['class'].'"/>'.$stat['body'].'</span>'; '<span class="'.$stat['class'].'">'.$stat['body'].'</span>' : '').'</span>';
} }
/** /**