Leenooks customisations for Kohana

This commit is contained in:
Deon George
2013-04-22 14:21:45 +10:00
parent a20cb078a8
commit f5c623d897
11 changed files with 103 additions and 319 deletions

View File

@@ -15,13 +15,15 @@ $application = 'application';
*/
$modules = 'modules';
$sysmodules = 'includes/kohana/modules';
/**
* The directory in which the Kohana resources are located. The system
* directory must contain the classes/kohana.php file.
*
* @link http://kohanaframework.org/guide/about.install#system
*/
$system = 'system';
$system = 'includes/kohana/system';
/**
* The default extension of resource files. If you change this, all resources
@@ -74,6 +76,12 @@ if ( ! is_dir($modules) AND is_dir(DOCROOT.$modules))
$modules = DOCROOT.$modules;
}
// Make the system relative to the docroot, for symlink'd index.php
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))
{
@@ -83,10 +91,11 @@ if ( ! is_dir($system) AND is_dir(DOCROOT.$system))
// 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);
// Clean up the configuration vars
unset($application, $modules, $system);
unset($application, $modules, $sysmodules, $system);
/**
* Define the start time of the application, used for profiling.
@@ -104,6 +113,8 @@ if ( ! defined('KOHANA_START_MEMORY'))
define('KOHANA_START_MEMORY', memory_get_usage());
}
define('PHPUNITTEST','192.168.242.3');
// Bootstrap the application
require APPPATH.'bootstrap'.EXT;
@@ -122,4 +133,4 @@ if (($ob_len = ob_get_length()) !== FALSE)
}
// Enable the unittest module
Kohana::modules(Kohana::modules() + array('unittest' => MODPATH.'unittest'));
Kohana::modules(Kohana::modules() + array('unittest' => SMDPATH.'unittest'));