FIX adding css by page if url is externam

This commit is contained in:
Laurent Destailleur 2019-02-15 00:46:11 +01:00
parent 62760bf1e2
commit 44c1d30f6f

View File

@ -1335,7 +1335,15 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
{
foreach($arrayofcss as $cssfile)
{
print '<!-- Includes CSS added by page -->'."\n".'<link rel="stylesheet" type="text/css" title="default" href="'.dol_buildpath($cssfile, 1);
if (preg_match('/^http/i', $cssfile))
{
$urltofile=$cssfile;
}
else
{
$urltofile=dol_buildpath($cssfile, 1);
}
print '<!-- Includes CSS added by page -->'."\n".'<link rel="stylesheet" type="text/css" title="default" href="'.$urltofile;
// 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 $themeparam;
print '">'."\n";