[ Index ]

PHP Cross Reference of Joomla 2.5.4 DE

title

Body

[close]

/installation/ -> index.php (source)

   1  <?php
   2  /**
   3   * @package        Joomla.Installation
   4   * @copyright    Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
   5   * @license        GNU General Public License version 2 or later; see LICENSE.txt
   6   */
   7  
   8  // PHP 5 check
   9  if (version_compare(PHP_VERSION, '5.2.4', '<')) {
  10      die('Your host needs to use PHP 5.2.4 or higher to run this version of Joomla!');
  11  }
  12  
  13  /**
  14   * Constant that is checked in included files to prevent direct access.
  15   */
  16  define('_JEXEC', 1);
  17  
  18  /**
  19   * Constant that defines the base path of the installed Joomla site.
  20   */
  21  define('JPATH_BASE', dirname(__FILE__));
  22  
  23  /**
  24   * Shortcut for the directory separator character.
  25   */
  26  define('DS', DIRECTORY_SEPARATOR);
  27  
  28  // Set path constants.
  29  $parts = explode(DIRECTORY_SEPARATOR, JPATH_BASE);
  30  array_pop($parts);
  31  
  32  define('JPATH_ROOT',            implode(DIRECTORY_SEPARATOR, $parts));
  33  define('JPATH_SITE',            JPATH_ROOT);
  34  define('JPATH_CONFIGURATION',    JPATH_ROOT);
  35  define('JPATH_ADMINISTRATOR',    JPATH_ROOT . '/administrator');
  36  define('JPATH_LIBRARIES',        JPATH_ROOT . '/libraries');
  37  define('JPATH_PLUGINS',            JPATH_ROOT . '/plugins');
  38  define('JPATH_INSTALLATION',    JPATH_ROOT . '/installation');
  39  define('JPATH_THEMES',            JPATH_BASE);
  40  define('JPATH_CACHE',            JPATH_ROOT . '/cache');
  41  define('JPATH_MANIFESTS',        JPATH_ADMINISTRATOR . '/manifests');
  42  
  43  /*
  44   * Joomla system checks.
  45   */
  46  error_reporting(E_ALL);
  47  @ini_set('magic_quotes_runtime', 0);
  48  @ini_set('zend.ze1_compatibility_mode', '0');
  49  
  50  /*
  51   * Check for existing configuration file.
  52   */
  53  if (file_exists(JPATH_CONFIGURATION.'/configuration.php') && (filesize(JPATH_CONFIGURATION.'/configuration.php') > 10) && !file_exists(JPATH_INSTALLATION.'/index.php')) {
  54      header('Location: ../index.php');
  55      exit();
  56  }
  57  
  58  //
  59  // Joomla system startup.
  60  //
  61  
  62  // Bootstrap the Joomla Framework.
  63  require_once JPATH_LIBRARIES.'/import.php';
  64  
  65  // Botstrap the CMS libraries.
  66  require_once JPATH_LIBRARIES.'/cms.php';
  67  
  68  // Joomla library imports.
  69  jimport('joomla.database.table');
  70  jimport('joomla.environment.uri');
  71  jimport('joomla.utilities.utility');
  72  jimport('joomla.utilities.arrayhelper');
  73  
  74  // Create the application object.
  75  $app = JFactory::getApplication('installation');
  76  
  77  // Initialise the application.
  78  $app->initialise();
  79  
  80  // Render the document.
  81  $app->render();
  82  
  83  // Return the response.
  84  echo $app;


Generated: Tue Apr 3 11:40:28 2012 Cross-referenced by PHPXref 0.7.1