Skip to content
This repository has been archived by the owner on Jul 12, 2018. It is now read-only.

Commit

Permalink
Move error templates in another location
Browse files Browse the repository at this point in the history
  • Loading branch information
ohartl committed Mar 4, 2016
1 parent 79d1ba2 commit a0c88ff
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions include/php/classes/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class Router
* @var array
*/
private static $errorPages = array(
404 => 'include/php/pages/404.php',
403 => 'include/php/pages/not-allowed.php'
404 => 'include/php/template/error/not-found.php',
403 => 'include/php/template/error/not-allowed.php'
);


Expand Down Expand Up @@ -225,9 +225,16 @@ public static function loadAndBufferOutput($file, $variables = array())
*
* @return string
*/
public static function url($url)
public static function url($url = '')
{
return sprintf('%s/%s', rtrim(Config::get('base_url'), '/'), trim($url, '/'));
return rtrim(
sprintf(
'%s/%s',
rtrim(Config::get('base_url'), '/'),
trim($url, '/')
),
'/'
);
}


Expand Down
File renamed without changes.

0 comments on commit a0c88ff

Please sign in to comment.