Move error templates in another location

This commit is contained in:
ohartl 2016-03-04 11:47:11 +01:00
parent 79d1ba2d6a
commit a0c88ff757
3 changed files with 11 additions and 4 deletions

View file

@ -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'
);
@ -225,9 +225,16 @@ class Router
*
* @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, '/')
),
'/'
);
}