cli_patch.patch

Jeremy Bush -, 01/20/2009 07:46 pm

Download (1.1 kB)

 
index.php (working copy)
74 74
// $Id$
75 75
//
76 76

  
77
$kohana_pathinfo = pathinfo(__FILE__);
77 78
// Define the front controller name and docroot
78
define('DOCROOT', getcwd().DIRECTORY_SEPARATOR);
79
define('KOHANA',  basename(__FILE__));
79
define('DOCROOT', $kohana_pathinfo['dirname'].DIRECTORY_SEPARATOR);
80
define('KOHANA',  $kohana_pathinfo['basename']);
80 81

  
81 82
// If the front controller is a symlink, change to the real docroot
82 83
is_link(KOHANA) and chdir(dirname(realpath(__FILE__)));
83 84

  
85
// If kohana folders are relative paths, make them absolute.
86
$kohana_application = file_exists($kohana_application) ? $kohana_application : DOCROOT.$kohana_application;
87
$kohana_modules = file_exists($kohana_modules) ? $kohana_modules : DOCROOT.$kohana_modules;
88
$kohana_system = file_exists($kohana_system) ? $kohana_system : DOCROOT.$kohana_system;
89

  
84 90
// Define application and system paths
85 91
define('APPPATH', str_replace('\\', '/', realpath($kohana_application)).'/');
86 92
define('MODPATH', str_replace('\\', '/', realpath($kohana_modules)).'/');