From 62fbeda480f2758d19441ade0b0f9143766f7b64 Mon Sep 17 00:00:00 2001 From: ralf Date: Sun, 25 Aug 2024 12:15:35 +0200 Subject: [PATCH] fix a couple of problems with new images: infinite recursion and order they are found (navbar) --- api/js/jsapi/egw_images.js | 10 ++++------ api/src/Image.php | 2 -- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/api/js/jsapi/egw_images.js b/api/js/jsapi/egw_images.js index a8343888f2..50eb1ea569 100644 --- a/api/js/jsapi/egw_images.js +++ b/api/js/jsapi/egw_images.js @@ -103,13 +103,11 @@ egw.extend('images', egw.MODULE_GLOBAL, function() } } tries['global'] = _name; - if (typeof images['global'] !== 'undefined' && typeof images['global'][_name] === 'string') + if (_name !== 'navbar' && // do NOT overwrite navbar images of all apps with placeholder + typeof images['global'] !== 'undefined' && typeof images['global'][_name] === 'string'&& + typeof images['bootstrap'] !== 'undefined' && typeof images['bootstrap'][images['global'][_name]] == 'string') { - if (typeof images['bootstrap'] !== 'undefined' && typeof images['bootstrap'][_name] == 'string') - { - return this.webserverUrl+images['bootstrap'][_name]; - } - return this.image(images['global'][_name], _app); + return this.webserverUrl+images['bootstrap'][images['global'][_name]]; } tries[_app + (_app == 'phpgwapi' ? " (current app)" : "")] = _name; if (typeof images[_app] != 'undefined' && typeof images[_app][_name] == 'string') diff --git a/api/src/Image.php b/api/src/Image.php index ab40ff4f5b..e0e43785c2 100644 --- a/api/src/Image.php +++ b/api/src/Image.php @@ -133,8 +133,6 @@ class Image 'priority' => 'dash-circle', 'private' => 'key', 'reload' => 'arrow-clockwise', - 'save' => 'api/save', // @todo: as bootstrap's save would shadow api/save and is not fitting - 'save_new' => 'api/save_new', // @todo 'save_zip' => 'file-zip', //'search' => 'search', 'security-update' => 'shield-exclamation',