Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 73 lines (59 sloc) 2.025 kB
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
1 <?php
2 /**
0a72863 @LouisLandry Fixing file headers for both unit test and library files.
LouisLandry authored
3 * @package Joomla.Platform
4 *
5 * @copyright Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
6 * @license GNU General Public License version 2 or later; see LICENSE
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
7 */
8
9 defined('_JEXEC') or die;
10
11 // Set the platform root path as a constant if necessary.
12 if (!defined('JPATH_PLATFORM')) {
13 define('JPATH_PLATFORM', dirname(__FILE__));
14 }
15
16 // Set the directory separator define if necessary.
17 if (!defined('DS')) {
18 define('DS', DIRECTORY_SEPARATOR);
19 }
20
21 // Detect the native operating system type.
22 $os = strtoupper(substr(PHP_OS, 0, 3));
23 if (!defined('IS_WIN')) {
24 define('IS_WIN', ($os === 'WIN') ? true : false);
25 }
26 if (!defined('IS_MAC')) {
27 define('IS_MAC', ($os === 'MAC') ? true : false);
28 }
29 if (!defined('IS_UNIX')) {
30 define('IS_UNIX', (($os !== 'MAC') && ($os !== 'WIN')) ? true : false);
31 }
32
33 // Import the platform version library if necessary.
34 if (!class_exists('JVersion')) {
35 require_once JPATH_PLATFORM.'/version.php';
36 }
37
38 // Import the library loader if necessary.
39 if (!class_exists('JLoader')) {
40 require_once JPATH_PLATFORM.'/loader.php';
41 }
42
43 /**
44 * Import the base Joomla Platform libraries.
45 */
46
47 // Import the factory library.
48 JLoader::import('joomla.factory');
49
50 // Import the exception and error handling libraries.
51 JLoader::import('joomla.error.error');
52 JLoader::import('joomla.error.exception');
53
54 /*
55 * If the HTTP_HOST environment variable is set we assume a Web request and
56 * thus we import the request library and most likely clean the request input.
57 */
58 if (isset($_SERVER['HTTP_HOST'])) {
59 JLoader::import('joomla.environment.request');
60
61 // If an application flags it doesn't want this, adhere to that.
62 if (!defined('_JREQUEST_NO_CLEAN')) {
63 JRequest::clean();
64 }
65 }
66
67 // Import the base object library.
68 JLoader::import('joomla.base.object');
69
70 // Register classes that don't follow one file per class naming conventions.
71 JLoader::register('JText', JPATH_PLATFORM.'/joomla/methods.php');
72 JLoader::register('JRoute', JPATH_PLATFORM.'/joomla/methods.php');
Something went wrong with that request. Please try again.