Updating test.php to bootstrap like index.php

Updating skel file to match app one.
This commit is contained in:
mark_story 2010-11-14 12:48:52 -05:00
parent cb4dfc4ee0
commit 8e29595b63
3 changed files with 8 additions and 23 deletions

View file

@ -65,13 +65,8 @@ if (!defined('WWW_ROOT')) {
define('WWW_ROOT', dirname(__FILE__) . DS); define('WWW_ROOT', dirname(__FILE__) . DS);
} }
if (!defined('CORE_PATH')) { if (!defined('CORE_PATH')) {
if (function_exists('ini_set') && ini_set('include_path', CAKE_CORE_INCLUDE_PATH . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS . PATH_SEPARATOR . ini_get('include_path'))) { define('APP_PATH', ROOT . DS . APP_DIR . DS);
define('APP_PATH', null); define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
define('CORE_PATH', null);
} else {
define('APP_PATH', ROOT . DS . APP_DIR . DS);
define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
}
} }
if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) { if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) {
trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR);

View file

@ -65,13 +65,8 @@
define('WWW_ROOT', dirname(__FILE__) . DS); define('WWW_ROOT', dirname(__FILE__) . DS);
} }
if (!defined('CORE_PATH')) { if (!defined('CORE_PATH')) {
if (function_exists('ini_set') && ini_set('include_path', CAKE_CORE_INCLUDE_PATH . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS . PATH_SEPARATOR . ini_get('include_path'))) { define('APP_PATH', ROOT . DS . APP_DIR . DS);
define('APP_PATH', null); define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
define('CORE_PATH', null);
} else {
define('APP_PATH', ROOT . DS . APP_DIR . DS);
define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
}
} }
if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) { if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) {
trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR);
@ -79,7 +74,7 @@
if (isset($_GET['url']) && $_GET['url'] === 'favicon.ico') { if (isset($_GET['url']) && $_GET['url'] === 'favicon.ico') {
return; return;
} else { } else {
require CAKE . 'dispatcher.php'; require LIBS . 'dispatcher.php';
$Dispatcher = new Dispatcher(); $Dispatcher = new Dispatcher();
$Dispatcher->dispatch(); $Dispatcher->dispatch(new CakeRequest($_GET['url']));
} }

View file

@ -65,13 +65,8 @@ if (!defined('WWW_ROOT')) {
define('WWW_ROOT', dirname(__FILE__) . DS); define('WWW_ROOT', dirname(__FILE__) . DS);
} }
if (!defined('CORE_PATH')) { if (!defined('CORE_PATH')) {
if (function_exists('ini_set') && ini_set('include_path', CAKE_CORE_INCLUDE_PATH . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS . PATH_SEPARATOR . ini_get('include_path'))) { define('APP_PATH', ROOT . DS . APP_DIR . DS);
define('APP_PATH', null); define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
define('CORE_PATH', null);
} else {
define('APP_PATH', ROOT . DS . APP_DIR . DS);
define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
}
} }
if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) { if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) {
trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR);