From ae7e3dcf2d1721c3082cddceb856489127381137 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 7 Feb 2025 09:54:02 +0100 Subject: [PATCH] NEW: add const to not include default CSS in top_htmlhead with DISABLE_CSS_DEFAULT_THEME --- htdocs/main.inc.php | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 1bfd7b4361e..d25d87140b9 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -2036,22 +2036,24 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr print ''."\n"; } - print ''."\n"; - // Output style sheets (optioncss='print' or ''). Note: $conf->css looks like '/theme/eldy/style.css.php' - $themepath = dol_buildpath($conf->css, 1); - $themesubdir = ''; - if (!empty($conf->modules_parts['theme'])) { // This slow down - foreach ($conf->modules_parts['theme'] as $reldir) { - if (file_exists(dol_buildpath($reldir.$conf->css, 0))) { - $themepath = dol_buildpath($reldir.$conf->css, 1); - $themesubdir = $reldir; - break; + if (!defined('DISABLE_CSS_DEFAULT_THEME')) { + print ''."\n"; + // Output style sheets (optioncss='print' or ''). Note: $conf->css looks like '/theme/eldy/style.css.php' + $themepath = dol_buildpath($conf->css, 1); + $themesubdir = ''; + if (!empty($conf->modules_parts['theme'])) { // This slow down + foreach ($conf->modules_parts['theme'] as $reldir) { + if (file_exists(dol_buildpath($reldir.$conf->css, 0))) { + $themepath = dol_buildpath($reldir.$conf->css, 1); + $themesubdir = $reldir; + break; + } } } + + print '' . "\n"; } - //print 'themepath='.$themepath.' themeparam='.$themeparam;exit; - print ''."\n"; if (getDolGlobalString('MAIN_FIX_FLASH_ON_CHROME')) { print ''."\n".''."\n"; }