Skip to content

Commit

Permalink
Fix absolute path generation in buildLocalLink
Browse files Browse the repository at this point in the history
  • Loading branch information
Sommerregen committed Jun 25, 2016
1 parent 3714a8d commit 4cb8a04
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions system/src/Grav/Common/Assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ public function addJs($asset, $priority = null, $pipeline = true, $loading = nul
'asset' => $asset,
'priority' => intval($priority ?: 10),
'order' => count($this->js),
'pipeline' => (bool)$pipeline,
'pipeline' => (bool) $pipeline,
'loading' => $loading ?: '',
'group' => $group ?: 'head',
'modified' => $modified
Expand Down Expand Up @@ -1112,8 +1112,8 @@ protected function buildLocalLink($asset, $absolute = false)
} catch (\Exception $e) {
}

$base_url = $absolute ? '/' : $this->base_url;
return $asset ? $base_url . ltrim($asset, '/') : false;
$uri = $absolute ? $asset : $this->base_url . ltrim($asset, '/');
return $asset ? $uri : false;
}

/**
Expand Down

0 comments on commit 4cb8a04

Please sign in to comment.