From cd0cbab3731b988223e7ad44d78306e18fe3096c Mon Sep 17 00:00:00 2001 From: vipsoft Date: Wed, 8 Jul 2009 04:19:14 +0000 Subject: fixes #803 - remove unnecessary require_once from core, plugins, and parts of libs. (I didn't touch: open-flash-chart, Zend Framework, and PEAR HTML.) --- index.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 169d06e39c..5fef703249 100644 --- a/index.php +++ b/index.php @@ -30,24 +30,22 @@ if((@include "Version.php") === false || !class_exists('Piwik_Version', false)) . PATH_SEPARATOR . PIWIK_INCLUDE_PATH . '/plugins'); } -require_once "core/testMinimumPhpVersion.php"; +require_once PIWIK_INCLUDE_PATH . '/core/testMinimumPhpVersion.php'; // NOTE: the code above this comment must be PHP4 compatible +session_cache_limiter('nocache'); @date_default_timezone_set(date_default_timezone_get()); +require_once PIWIK_INCLUDE_PATH .'/core/Loader.php'; if(!defined('PIWIK_ENABLE_ERROR_HANDLER') || PIWIK_ENABLE_ERROR_HANDLER) { - require_once "core/ErrorHandler.php"; - require_once "core/ExceptionHandler.php"; - + require_once PIWIK_INCLUDE_PATH .'/core/ErrorHandler.php'; + require_once PIWIK_INCLUDE_PATH .'/core/ExceptionHandler.php'; set_error_handler('Piwik_ErrorHandler'); set_exception_handler('Piwik_ExceptionHandler'); } -session_cache_limiter('nocache'); - -require_once "core/Loader.php"; if(!defined('PIWIK_ENABLE_DISPATCH') || PIWIK_ENABLE_DISPATCH) { $controller = Piwik_FrontController::getInstance(); -- cgit v1.2.3