moved error pages to application directory.
This commit is contained in:
@@ -20,7 +20,6 @@ define('MODEL_PATH', APP_PATH.'models/');
|
|||||||
define('ROUTE_PATH', APP_PATH.'routes/');
|
define('ROUTE_PATH', APP_PATH.'routes/');
|
||||||
define('SESSION_PATH', STORAGE_PATH.'sessions/');
|
define('SESSION_PATH', STORAGE_PATH.'sessions/');
|
||||||
define('SYS_CONFIG_PATH', SYS_PATH.'config/');
|
define('SYS_CONFIG_PATH', SYS_PATH.'config/');
|
||||||
define('SYS_VIEW_PATH', SYS_PATH.'views/');
|
|
||||||
define('VIEW_PATH', APP_PATH.'views/');
|
define('VIEW_PATH', APP_PATH.'views/');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -70,21 +70,12 @@ class View {
|
|||||||
{
|
{
|
||||||
$view = str_replace('.', '/', $view);
|
$view = str_replace('.', '/', $view);
|
||||||
|
|
||||||
// Application views take priority over system views, so we will return the
|
|
||||||
// application version of the view if both exists. Also, we need to check
|
|
||||||
// for Blade views using the Blade extension. The Blade extension gives
|
|
||||||
// an easy method of determining if the view should be compiled using
|
|
||||||
// the Blade compiler or if the view is plain PHP.
|
|
||||||
foreach (array(EXT, BLADE_EXT) as $extension)
|
foreach (array(EXT, BLADE_EXT) as $extension)
|
||||||
{
|
{
|
||||||
if (file_exists($path = VIEW_PATH.$view.$extension))
|
if (file_exists($path = VIEW_PATH.$view.$extension))
|
||||||
{
|
{
|
||||||
return $path;
|
return $path;
|
||||||
}
|
}
|
||||||
elseif (file_exists($path = SYS_VIEW_PATH.$view.$extension))
|
|
||||||
{
|
|
||||||
return $path;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new \RuntimeException("View [$view] does not exist.");
|
throw new \RuntimeException("View [$view] does not exist.");
|
||||||
|
|||||||
Reference in New Issue
Block a user