FIX adding css by page if url is externam

Conflicts:
	htdocs/main.inc.php
This commit is contained in:
Laurent Destailleur 2019-02-15 00:46:11 +01:00
parent df5dbd4110
commit 7e171c8750

View File

@ -1306,7 +1306,15 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
{
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";