29
0
mirror of https://github.com/joomla/joomla-cms.git synced 2024-07-03 18:43:40 +00:00
cms/includes/framework.php
Mark Dexter 36bfb6321e Prepare for 1.7.0 release
git-svn-id: http://joomlacode.org/svn/joomla/development/trunk@21879 6f6e1ebd-4c2b-0410-823f-f34bde69bce9
2011-07-17 22:33:34 +00:00

90 lines
2.1 KiB
PHP

<?php
/**
* @version $Id$
* @package Joomla.Site
* @subpackage Application
* @copyright Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access.
defined('_JEXEC') or die;
//
// Joomla system checks.
//
@ini_set('magic_quotes_runtime', 0);
@ini_set('zend.ze1_compatibility_mode', '0');
//
// Installation check, and check on removal of the install directory.
//
if (!file_exists(JPATH_CONFIGURATION.'/configuration.php') || (filesize(JPATH_CONFIGURATION.'/configuration.php') < 10) || file_exists(JPATH_INSTALLATION.'/index.php')) {
if (file_exists(JPATH_INSTALLATION.'/index.php')) {
header('Location: '.substr($_SERVER['REQUEST_URI'],0,strpos($_SERVER['REQUEST_URI'],'index.php')).'installation/index.php');
exit();
} else {
echo 'No configuration file found and no installation code available. Exiting...';
exit();
}
}
//
// Joomla system startup.
//
// Import the cms version library if necessary.
if (!class_exists('JVersion')) {
require JPATH_ROOT.'/includes/version.php';
}
// System includes.
require_once JPATH_LIBRARIES.'/import.php';
// Pre-Load configuration.
require_once JPATH_CONFIGURATION.'/configuration.php';
// System configuration.
$CONFIG = new JConfig();
if (@$CONFIG->error_reporting === 0) {
error_reporting(0);
} else if (@$CONFIG->error_reporting > 0) {
error_reporting($CONFIG->error_reporting);
ini_set('display_errors', 1);
}
define('JDEBUG', $CONFIG->debug);
unset($CONFIG);
//
// Joomla framework loading.
//
// System profiler.
if (JDEBUG) {
jimport('joomla.error.profiler');
$_PROFILER = JProfiler::getInstance('Application');
}
//
// Joomla library imports.
//
jimport('joomla.application.menu');
jimport('joomla.user.user');
jimport('joomla.environment.uri');
jimport('joomla.filter.filterinput');
jimport('joomla.filter.filteroutput');
jimport('joomla.html.html');
jimport('joomla.utilities.utility');
jimport('joomla.event.event');
jimport('joomla.event.dispatcher');
jimport('joomla.language.language');
jimport('joomla.utilities.string');
jimport('joomla.utilities.arrayhelper');