From 8e29595b638216f46b07b1dfae4eb2b6fc47f409 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sun, 14 Nov 2010 12:48:52 -0500 Subject: [PATCH] Updating test.php to bootstrap like index.php Updating skel file to match app one. --- app/webroot/test.php | 9 ++------- cake/console/templates/skel/webroot/index.php | 13 ++++--------- cake/console/templates/skel/webroot/test.php | 9 ++------- 3 files changed, 8 insertions(+), 23 deletions(-) diff --git a/app/webroot/test.php b/app/webroot/test.php index b04b4a463..7a27e8e29 100644 --- a/app/webroot/test.php +++ b/app/webroot/test.php @@ -65,13 +65,8 @@ if (!defined('WWW_ROOT')) { define('WWW_ROOT', dirname(__FILE__) . DS); } 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', null); - define('CORE_PATH', null); - } else { - define('APP_PATH', ROOT . DS . APP_DIR . DS); - define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS); - } + define('APP_PATH', ROOT . DS . APP_DIR . DS); + define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS); } 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); diff --git a/cake/console/templates/skel/webroot/index.php b/cake/console/templates/skel/webroot/index.php index b2ddf4020..35ebed025 100644 --- a/cake/console/templates/skel/webroot/index.php +++ b/cake/console/templates/skel/webroot/index.php @@ -65,13 +65,8 @@ define('WWW_ROOT', dirname(__FILE__) . DS); } 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', null); - define('CORE_PATH', null); - } else { - define('APP_PATH', ROOT . DS . APP_DIR . DS); - define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS); - } + define('APP_PATH', ROOT . DS . APP_DIR . DS); + define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS); } 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); @@ -79,7 +74,7 @@ if (isset($_GET['url']) && $_GET['url'] === 'favicon.ico') { return; } else { - require CAKE . 'dispatcher.php'; + require LIBS . 'dispatcher.php'; $Dispatcher = new Dispatcher(); - $Dispatcher->dispatch(); + $Dispatcher->dispatch(new CakeRequest($_GET['url'])); } diff --git a/cake/console/templates/skel/webroot/test.php b/cake/console/templates/skel/webroot/test.php index b04b4a463..7a27e8e29 100644 --- a/cake/console/templates/skel/webroot/test.php +++ b/cake/console/templates/skel/webroot/test.php @@ -65,13 +65,8 @@ if (!defined('WWW_ROOT')) { define('WWW_ROOT', dirname(__FILE__) . DS); } 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', null); - define('CORE_PATH', null); - } else { - define('APP_PATH', ROOT . DS . APP_DIR . DS); - define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS); - } + define('APP_PATH', ROOT . DS . APP_DIR . DS); + define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS); } 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);