Revize 74a7dbca
Přidáno uživatelem Michal Kliment před více než 9 roky(ů)
index.php | ||
---|---|---|
define('EXT', '.php');
|
||
|
||
/**
|
||
* Test to make sure that Kohana is running on PHP 5.1.3 or newer. Once you are
|
||
* sure that your environment is compatible with Kohana, you can disable this.
|
||
* Test to make sure that FreenetIS is running on PHP 5.3.1 or newer.
|
||
*/
|
||
version_compare(PHP_VERSION, '5.1.3', '<') and exit('Kohana requires PHP 5.1.3 or newer.');
|
||
(PHP_VERSION_ID < 50301) and exit('FreenetIS requires PHP 5.3.1 or newer.');
|
||
|
||
//
|
||
// DO NOT EDIT BELOW THIS LINE, UNLESS YOU FULLY UNDERSTAND THE IMPLICATIONS.
|
||
... | ... | |
//
|
||
|
||
// Tests if system is running in unit testing mode
|
||
$unittest = (empty($_SERVER['SERVER_NAME']) && strpos(@$_SERVER['SCRIPT_NAME'], 'phpunit'));
|
||
define('UNITTEST', empty($_SERVER['SERVER_NAME']) &&
|
||
strpos(@$_SERVER['SCRIPT_NAME'], 'phpunit') !== FALSE);
|
||
|
||
// If unit testing change relative address of system and appplication folders
|
||
if ($unittest)
|
||
// If unit testing change relative address of system and application folders
|
||
if (UNITTEST)
|
||
{
|
||
$kohana_application = dirname(__FILE__) . '/' . $kohana_application;
|
||
$kohana_system = dirname(__FILE__) . '/' . $kohana_system;
|
||
|
||
$kohana_application = __DIR__ . '/' . $kohana_application;
|
||
$kohana_system = __DIR__ . '/' . $kohana_system;
|
||
|
||
// Define the front controller name and docroot
|
||
define('DOCROOT', dirname(__FILE__) . '/');
|
||
define('DOCROOT', __DIR__ . '/');
|
||
define('KOHANA', substr(__FILE__, strlen(DOCROOT)));
|
||
}
|
||
else
|
||
... | ... | |
(is_dir(APPPATH)) or die
|
||
(
|
||
'Your <code>$kohana_application</code> directory does not exist. '.
|
||
'Set a valid <code>$kohana_application</code> in <tt>'.KOHANA.'</tt> and refresh the page.'
|
||
'Set a valid <code>$kohana_application</code> in <tt>'.KOHANA.'</tt>.'
|
||
);
|
||
|
||
(is_dir(SYSPATH) AND file_exists(SYSPATH.'/core/'.'Bootstrap'.EXT)) or die
|
||
(
|
||
'Your <code>$kohana_system</code> directory does not exist. '.
|
||
'Set a valid <code>$kohana_system</code> in <tt>'.KOHANA.'</tt> and refresh the page.'
|
||
'Set a valid <code>$kohana_system</code> in <tt>'.KOHANA.'</tt>.'
|
||
);
|
||
|
||
// Mail to developers
|
||
... | ... | |
define('AXODOC_URL', 'http://axo.doc.freenetis.org/');
|
||
|
||
// If unit testing just initilize do not execute
|
||
if($unittest)
|
||
if (UNITTEST)
|
||
{
|
||
require 'tests/BootstrapPHPUnit'.EXT;
|
||
}
|
Také k dispozici: Unified diff
Merge from SVN branch 1.2.