Skip to content
This repository has been archived by the owner on Apr 25, 2019. It is now read-only.

Commit

Permalink
#112 Fix preview links thanks to @ejrowley.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gareth Joyce committed Oct 27, 2016
1 parent a0b3682 commit b92af9a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion inc/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@ function getRequestPath() {

function pathToUrl($path) {
$base = dirname(__DIR__);
return 'pattern' . substr($path, strlen($base), -4);
$path = realpath($path);
$path = substr($path, strlen($base), -4);
return $path;
}

function isIndex() {
Expand Down

0 comments on commit b92af9a

Please sign in to comment.