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

Commit

Permalink
CI 3.1.6 core updated to support Bonfire classes. Fixes #1260
Browse files Browse the repository at this point in the history
  • Loading branch information
lonnieezell committed Sep 28, 2017
1 parent 6a9df1a commit 7ba0841
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions bonfire/ci3/core/CodeIgniter.php
Original file line number Diff line number Diff line change
Expand Up @@ -402,13 +402,22 @@ function &get_instance()
$class = ucfirst($RTR->class);
$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')
&& ! file_exists(BFPATH.'controllers/'.$RTR->directory.$class.'.php'))
)
{
$e404 = TRUE;
}
else
{
require_once(APPPATH.'controllers/'.$RTR->directory.$class.'.php');
if (file_exists(APPPATH . 'controllers/' . $RTR->directory . $class . '.php'))
{
require_once(APPPATH . 'controllers/' . $RTR->directory . $class . '.php');
}
elseif (file_exists(BFPATH . 'controllers/' . $RTR->directory . $class . '.php'))
{
require_once(BFPATH . 'controllers/' . $RTR->directory . $class . '.php');
}

if ( ! class_exists($class, FALSE) OR $method[0] === '_' OR method_exists('CI_Controller', $method))
{
Expand Down

2 comments on commit 7ba0841

@silverark
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You beat me to it.

@lonnieezell
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:) I had a few minutes while waiting for answers at work and thought I should do it real quick while thinking about it.

Please sign in to comment.