Customisations to KH
This commit is contained in:
@@ -92,7 +92,7 @@ class Kohana_Minion_CLI {
|
||||
{
|
||||
foreach ($values as $opt => $value)
|
||||
{
|
||||
if ( ! in_array($opt, $options))
|
||||
if ( ! in_array($opt, $options, TRUE))
|
||||
{
|
||||
// Set the given value
|
||||
unset($values[$opt]);
|
||||
|
@@ -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'));
|
||||
|
@@ -252,13 +252,17 @@ class Kohana_Debug {
|
||||
{
|
||||
$file = 'APPPATH'.DIRECTORY_SEPARATOR.substr($file, strlen(APPPATH));
|
||||
}
|
||||
elseif (strpos($file, MODPATH) === 0)
|
||||
{
|
||||
$file = 'MODPATH'.DIRECTORY_SEPARATOR.substr($file, strlen(MODPATH));
|
||||
}
|
||||
elseif (strpos($file, SYSPATH) === 0)
|
||||
{
|
||||
$file = 'SYSPATH'.DIRECTORY_SEPARATOR.substr($file, strlen(SYSPATH));
|
||||
}
|
||||
elseif (strpos($file, MODPATH) === 0)
|
||||
elseif (strpos($file, SMDPATH) === 0)
|
||||
{
|
||||
$file = 'MODPATH'.DIRECTORY_SEPARATOR.substr($file, strlen(MODPATH));
|
||||
$file = 'SMDPATH'.DIRECTORY_SEPARATOR.substr($file, strlen(SMDPATH));
|
||||
}
|
||||
elseif (strpos($file, DOCROOT) === 0)
|
||||
{
|
||||
|
@@ -250,7 +250,7 @@ class Kohana_CoreTest extends Unittest_TestCase
|
||||
{
|
||||
return array(
|
||||
array(array('unittest' => MODPATH.'fo0bar')),
|
||||
array(array('unittest' => MODPATH.'unittest', 'fo0bar' => MODPATH.'fo0bar')),
|
||||
array(array('unittest' => SMDPATH.'unittest', 'fo0bar' => MODPATH.'fo0bar')),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -292,7 +292,7 @@ class Kohana_CoreTest extends Unittest_TestCase
|
||||
{
|
||||
return array(
|
||||
array(array(), array()),
|
||||
array(array('unittest' => MODPATH.'unittest'), array('unittest' => $this->dirSeparator(MODPATH.'unittest/'))),
|
||||
array(array('unittest' => SMDPATH.'unittest'), array('unittest' => $this->dirSeparator(SMDPATH.'unittest/'))),
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -59,8 +59,8 @@ class Kohana_DebugTest extends Unittest_TestCase
|
||||
'SYSPATH'.DIRECTORY_SEPARATOR.'classes'.DIRECTORY_SEPARATOR.'kohana.php'
|
||||
),
|
||||
array(
|
||||
MODPATH.$this->dirSeparator('unittest/classes/kohana/unittest/runner').EXT,
|
||||
$this->dirSeparator('MODPATH/unittest/classes/kohana/unittest/runner').EXT
|
||||
SMDPATH.$this->dirSeparator('unittest/classes/kohana/unittest/runner').EXT,
|
||||
$this->dirSeparator('SMDPATH/unittest/classes/kohana/unittest/runner').EXT
|
||||
),
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user