mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Perf: Little speed enhancement for external modules using their own static css.
This commit is contained in:
parent
85cadf443d
commit
fdd8edd84c
|
|
@ -916,7 +916,10 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
|||
{
|
||||
foreach($conf->css_modules as $cssfile)
|
||||
{ // cssfile is an absolute path
|
||||
print '<link rel="stylesheet" type="text/css" title="default" href="'.dol_buildpath($cssfile,1).'?lang='.$langs->defaultlang.'&theme='.$conf->theme.(GETPOST('optioncss')?'&optioncss='.GETPOST('optioncss'):'').'">'."\n";
|
||||
print '<link rel="stylesheet" type="text/css" title="default" href="'.dol_buildpath($cssfile,1);
|
||||
// We add params only if page is not static, because some web server setup does not return content type text/css if url has parameters and browser cache is not used.
|
||||
if (!preg_match('/\.css$/i',$cssfile)) print '?lang='.$langs->defaultlang.'&theme='.$conf->theme.(GETPOST('optioncss')?'&optioncss='.GETPOST('optioncss'):'');
|
||||
print '">'."\n";
|
||||
}
|
||||
}
|
||||
// CSS forced by page in top_htmlhead call (relative url starting with /)
|
||||
|
|
@ -924,7 +927,10 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
|||
{
|
||||
foreach($arrayofcss as $cssfile)
|
||||
{
|
||||
print '<link rel="stylesheet" type="text/css" title="default" href="'.dol_buildpath($cssfile,1).'?lang='.$langs->defaultlang.'&theme='.$conf->theme.(GETPOST('optioncss')?'&optioncss='.GETPOST('optioncss'):'').'">'."\n";
|
||||
print '<link rel="stylesheet" type="text/css" title="default" href="'.dol_buildpath($cssfile,1);
|
||||
// We add params only if page is not static, because some web server setup does not return content type text/css if url has parameters and browser cache is not used.
|
||||
if (!preg_match('/\.css$/i',$cssfile)) print '?lang='.$langs->defaultlang.'&theme='.$conf->theme.(GETPOST('optioncss')?'&optioncss='.GETPOST('optioncss'):'');
|
||||
print '">'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user