Skip to content

Commit

Permalink
Adapted core to support HMVC
Browse files Browse the repository at this point in the history
  • Loading branch information
dchill42 committed Aug 31, 2011
1 parent d369077 commit 3583c13
Show file tree
Hide file tree
Showing 17 changed files with 1,500 additions and 1,079 deletions.
20 changes: 18 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,23 @@
// Is the system path correct?
if ( ! is_dir($system_path))
{
exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ".pathinfo(__FILE__, PATHINFO_BASENAME));
// Try include directories for a centralized system path
$found = FALSE;
foreach (explode(PATH_SEPARATOR, get_include_path()) as $path)
{
$path = rtrim($path.'\/').'/'.$system_path;
if (is_dir($path)) {
$system_path = $path;
$found = TRUE;
break;
}
}

if (!$found)
{
exit('Your system folder path does not appear to be set correctly. Please open the following file '.
'and correct this: '.pathinfo(__FILE__, PATHINFO_BASENAME));
}
}

/*
Expand Down Expand Up @@ -235,4 +251,4 @@
require_once BASEPATH.'core/CodeIgniter.php';

/* End of file index.php */
/* Location: ./index.php */
/* Location: ./index.php */
Loading

1 comment on commit 3583c13

@joseluisq
Copy link

Choose a reason for hiding this comment

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

Great 👍

Please sign in to comment.