Fix 404 errors caused by none existing html editor icons

This commit is contained in:
Hadi Nategh 2021-06-15 12:03:13 +02:00
parent 4ef9b08457
commit 001d5168ee

View File

@ -118,11 +118,12 @@ class HtmlArea extends Etemplate\Widget
$toolbar_selOptions = array(); $toolbar_selOptions = array();
foreach (self::$toolbar_list as $toolbar) foreach (self::$toolbar_list as $toolbar)
{ {
$file = '/api/templates/default/images/htmlarea/'.$toolbar.'.svg';
$toolbar_selOptions[$toolbar] = array ( $toolbar_selOptions[$toolbar] = array (
'id' => $toolbar, 'id' => $toolbar,
'label' => lang($toolbar), 'label' => lang($toolbar),
'title' => lang($toolbar), 'title' => lang($toolbar),
'icon' => Api\Framework::getUrl($GLOBALS['egw_info']['server']['webserver_url']).'/api/templates/default/images/htmlarea/'.$toolbar.'.svg', 'icon' => file_exists(EGW_SERVER_ROOT.$file)?Api\Framework::getUrl($GLOBALS['egw_info']['server']['webserver_url'].$file):'',
'app' => 'api' 'app' => 'api'
); );
} }