kopia lustrzana https://github.com/magicbug/Cloudlog
load class from controller path from third_party
rodzic
ae4a7e596b
commit
ad572219ec
|
@ -402,13 +402,17 @@ if ( ! is_php('5.4'))
|
||||||
$class = ucfirst($RTR->class);
|
$class = ucfirst($RTR->class);
|
||||||
$method = $RTR->method;
|
$method = $RTR->method;
|
||||||
|
|
||||||
if (empty($class) OR ! file_exists(APPPATH.'controllers/'.$RTR->directory.$class.'.php'))
|
if (empty($class) OR !(file_exists(APPPATH.'controllers/'.$RTR->directory.$class.'.php') OR file_exists(APPPATH.'third_party/controllers/'.$RTR->directory.$class.'.php')))
|
||||||
{
|
{
|
||||||
$e404 = TRUE;
|
$e404 = TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
require_once(APPPATH.'controllers/'.$RTR->directory.$class.'.php');
|
if (file_exists(APPPATH.'third_party/controllers/'.$RTR->directory.$class.'.php')) {
|
||||||
|
require_once(APPPATH.'third_party/controllers/'.$RTR->directory.$class.'.php');
|
||||||
|
} else {
|
||||||
|
require_once(APPPATH.'controllers/'.$RTR->directory.$class.'.php');
|
||||||
|
}
|
||||||
|
|
||||||
if ( ! class_exists($class, FALSE) OR $method[0] === '_' OR method_exists('CI_Controller', $method))
|
if ( ! class_exists($class, FALSE) OR $method[0] === '_' OR method_exists('CI_Controller', $method))
|
||||||
{
|
{
|
||||||
|
|
Ładowanie…
Reference in New Issue