Skip to content

Commit

Permalink
resolve streams earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Apr 27, 2018
1 parent 27df27d commit f681f1c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions system/src/Grav/Common/Page/Medium/Medium.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,11 @@ public function url($reset = true)
{
$output = preg_replace('|^' . preg_quote(GRAV_ROOT, '|') . '|', '', $this->get('filepath'));

$locator = Grav::instance()['locator'];
if ($locator->isStream($output)) {
$output = $locator->findResource($output, false);
}

if ($reset) {
$this->reset();
}
Expand Down

0 comments on commit f681f1c

Please sign in to comment.