From a4f21bc80462f85867357fe42638b4970a713f12 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 15 Jun 2021 12:11:43 +0200 Subject: [PATCH] Fix 404 errors caused by none existing html editor icons --- api/src/Etemplate/Widget/HtmlArea.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/src/Etemplate/Widget/HtmlArea.php b/api/src/Etemplate/Widget/HtmlArea.php index c80b0ab2d4..e9c921ecc3 100644 --- a/api/src/Etemplate/Widget/HtmlArea.php +++ b/api/src/Etemplate/Widget/HtmlArea.php @@ -118,11 +118,12 @@ class HtmlArea extends Etemplate\Widget $toolbar_selOptions = array(); foreach (self::$toolbar_list as $toolbar) { + $file = '/api/templates/default/images/htmlarea/'.$toolbar.'.svg'; $toolbar_selOptions[$toolbar] = array ( 'id' => $toolbar, 'label' => 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' ); }