Skip to content

Commit

Permalink
Clean up any trailing extensions on the route
Browse files Browse the repository at this point in the history
  • Loading branch information
kolber committed Apr 5, 2013
1 parent c2f808e commit 3bbe4c4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/stacey.inc.php
Expand Up @@ -127,6 +127,9 @@ function __construct($get) {
$key = preg_replace(array('/\/$/', '/^\//'), '', $key);
# store file path for this current page
$this->route = isset($key) ? $key : 'index';
# TODO: Relative root path is set incorrectly (missing an extra ../)
# strip any trailing extensions from the url
$this->route = preg_replace('/[\._][\w\d]+?$/', '', $this->route);
$file_path = Helpers::url_to_file_path($this->route);

try {
Expand Down

0 comments on commit 3bbe4c4

Please sign in to comment.