Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix bug with CSS absolute URL (useful with a project's url like domai…

…n.tld/project/
  • Loading branch information...
commit d6bec499b9bb53f35400413fc243d676ca7796b2 1 parent 48b4a3f
@willdurand willdurand authored ornicar committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 dmCorePlugin/lib/view/html/layout/dmCoreLayoutHelper.php
View
4 dmCorePlugin/lib/view/html/layout/dmCoreLayoutHelper.php
@@ -168,7 +168,7 @@ public function renderStylesheets()
$html = '';
foreach ($stylesheets as $file => $options)
{
- $stylesheetTag = '<link rel="stylesheet" type="text/css" media="'.dmArray::get($options, 'media', 'all').'" href="'.$relativeUrlRoot.$file.'" />';
+ $stylesheetTag = '<link rel="stylesheet" type="text/css" media="'.dmArray::get($options, 'media', 'all').'" href="'.($file{0} === '/' ? $relativeUrlRoot.$file : $file).'" />';
if (isset($options['condition']))
{
@@ -199,7 +199,7 @@ public function renderHeadJavascripts()
$html = '';
foreach($javascripts as $file => $options)
- {
+ {
$html .= '<script type="text/javascript" src="'.($file{0} === '/' ? $relativeUrlRoot.$file : $file).'"></script>';
}
Please sign in to comment.
Something went wrong with that request. Please try again.