From 3c8ebc85994a0c4406bf2ff715fb02c1e3bc8a83 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 30 May 2024 13:44:47 -0400 Subject: [PATCH] Don't show skin tab if both skin and css are forced --- web/skins/classic/views/options.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/web/skins/classic/views/options.php b/web/skins/classic/views/options.php index ddfc84db1..246b06f57 100644 --- a/web/skins/classic/views/options.php +++ b/web/skins/classic/views/options.php @@ -26,6 +26,7 @@ if (!canView('System')) { $canEdit = canEdit('System'); $tabs = array(); +if (!defined('ZM_FORCE_CSS_DEFAULT') or !defined('ZM_FORCE_SKIN_DEFAULT')) $tabs['skins'] = translate('Display'); $tabs['system'] = translate('System'); $tabs['config'] = translate('Config'); @@ -179,8 +180,14 @@ foreach (array_map('basename', glob('skins/'.$skin.'/css/*', GLOB_ONLYDIR)) as $ ]; } else if ($tab == 'system') { // $configCats[$tab]['ZM_LANG_DEFAULT']['Hint'] = join('|', getLanguages()); - $configCats[$tab]['ZM_SKIN_DEFAULT']['Hint'] = join('|', array_map('basename', glob('skins/*',GLOB_ONLYDIR))); - $configCats[$tab]['ZM_CSS_DEFAULT']['Hint'] = join('|', array_map ( 'basename', glob('skins/'.ZM_SKIN_DEFAULT.'/css/*',GLOB_ONLYDIR) )); + if (defined('ZM_FORCE_SKIN_DEFAULT')) + $configCats[$tab]['ZM_SKIN_DEFAULT']['Hint'] = ZM_FORCE_SKIN_DEFAULT; + else + $configCats[$tab]['ZM_SKIN_DEFAULT']['Hint'] = join('|', array_map('basename', glob('skins/*',GLOB_ONLYDIR))); + if (defined('ZM_FORCE_CSS_DEFAULT')) + $configCats[$tab]['ZM_CSS_DEFAULT']['Hint'] = ZM_FORCE_CSS_DEFAULT; + else + $configCats[$tab]['ZM_CSS_DEFAULT']['Hint'] = join('|', array_map ( 'basename', glob('skins/'.ZM_SKIN_DEFAULT.'/css/*',GLOB_ONLYDIR) )); $configCats[$tab]['ZM_BANDWIDTH_DEFAULT']['Hint'] = $bandwidth_options; // create new multidim array for languages (code1|translation)