FIX adding css by page if url is externam
Conflicts: htdocs/main.inc.php
This commit is contained in:
parent
df5dbd4110
commit
7e171c8750
@ -1306,7 +1306,15 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
|||||||
{
|
{
|
||||||
foreach($arrayofcss as $cssfile)
|
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.
|
// 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;
|
if (!preg_match('/\.css$/i',$cssfile)) print $themeparam;
|
||||||
print '">'."\n";
|
print '">'."\n";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user