Upstream Patch: Enable SYSMODS to hold upstream modules
This commit is contained in:
12
kh.php
12
kh.php
@@ -15,6 +15,11 @@ $application = 'application';
|
||||
*/
|
||||
$modules = 'modules';
|
||||
|
||||
/**
|
||||
* The directory in which upstream Kohana resources (modules) are located.
|
||||
*/
|
||||
$sysmodules = 'includes/kohana/modules';
|
||||
|
||||
/**
|
||||
* The directory in which the Kohana resources are located. The system
|
||||
* directory must contain the classes/kohana.php file.
|
||||
@@ -70,6 +75,10 @@ if ( ! is_dir($application) AND is_dir(DOCROOT.$application))
|
||||
if ( ! is_dir($modules) AND is_dir(DOCROOT.$modules))
|
||||
$modules = DOCROOT.$modules;
|
||||
|
||||
// Make the system relative to the docroot
|
||||
if ( ! is_dir($sysmodules) AND is_dir(DOCROOT.$sysmodules))
|
||||
$sysmodules = DOCROOT.$sysmodules;
|
||||
|
||||
// Make the system relative to the docroot
|
||||
if ( ! is_dir($system) AND is_dir(DOCROOT.$system))
|
||||
$system = DOCROOT.$system;
|
||||
@@ -81,6 +90,7 @@ if ( ! is_dir($override) AND is_dir(DOCROOT.$override))
|
||||
// Define the absolute paths for configured directories
|
||||
define('APPPATH', realpath($application).DIRECTORY_SEPARATOR);
|
||||
define('MODPATH', realpath($modules).DIRECTORY_SEPARATOR);
|
||||
define('SMDPATH', realpath($sysmodules).DIRECTORY_SEPARATOR);
|
||||
define('SYSPATH', realpath($system).DIRECTORY_SEPARATOR);
|
||||
|
||||
if (is_dir(realpath($override)))
|
||||
@@ -89,7 +99,7 @@ else
|
||||
define('OVERPATH', '');
|
||||
|
||||
// Clean up the configuration vars
|
||||
unset($application, $modules, $system, $override);
|
||||
unset($application, $modules, $sysmodules, $system, $override);
|
||||
|
||||
if (file_exists('install'.EXT))
|
||||
{
|
||||
|
Reference in New Issue
Block a user