From b91566d35fd20a428ad97ec9498f7c91ee779413 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sun, 14 Nov 2010 14:45:09 -0500 Subject: [PATCH] Removing ini_set() in project root. Fixing notice errors that would happen when mod_rewrite wasn't enabled. --- app/webroot/index.php | 2 +- cake/console/templates/skel/webroot/index.php | 2 +- index.php | 14 +++----------- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/app/webroot/index.php b/app/webroot/index.php index 35ebed02553..719f172c41b 100644 --- a/app/webroot/index.php +++ b/app/webroot/index.php @@ -76,5 +76,5 @@ } else { require LIBS . 'dispatcher.php'; $Dispatcher = new Dispatcher(); - $Dispatcher->dispatch(new CakeRequest($_GET['url'])); + $Dispatcher->dispatch(new CakeRequest(isset($_GET['url']) ? $_GET['url'] : null)); } diff --git a/cake/console/templates/skel/webroot/index.php b/cake/console/templates/skel/webroot/index.php index 35ebed02553..719f172c41b 100644 --- a/cake/console/templates/skel/webroot/index.php +++ b/cake/console/templates/skel/webroot/index.php @@ -76,5 +76,5 @@ } else { require LIBS . 'dispatcher.php'; $Dispatcher = new Dispatcher(); - $Dispatcher->dispatch(new CakeRequest($_GET['url'])); + $Dispatcher->dispatch(new CakeRequest(isset($_GET['url']) ? $_GET['url'] : null)); } diff --git a/index.php b/index.php index 860f61d027c..cb0352b8af2 100644 --- a/index.php +++ b/index.php @@ -41,15 +41,7 @@ /** * Set the include path or define app and core path */ - if (function_exists('ini_set')) { - ini_set('include_path', - ini_get('include_path') . PATH_SEPARATOR . CAKE_CORE_INCLUDE_PATH - . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS - ); - 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); + require APP_DIR . DS . WEBROOT_DIR . DS . 'index.php';