-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.php
executable file
·115 lines (101 loc) · 2.81 KB
/
bootstrap.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<?php
/**
* XEF - ThemeXpert Extension Framework
*
* An extension development framework for ThemeXpert
*
* @package XEF - ThemeXpert Extension Framework
* @author ThemeXpert Team
* @copyright Copyright (c) 2010 - 2012, ThemeXpert.
* @license GNU General Public License version 3, or later
* @link http://www.themexpert.com
* @since 1.1
*/
// Protect from unauthorized access
defined('_JEXEC') or die('Restricted access');
/**
*
* Bootstrap the framework and provide common functionality
*
*/
/*
* ------------------------------------------------------
* Check PHP version and EJECT if older version detected
* ------------------------------------------------------
*/
if(defined('PHP_VERSION')) {
$version = PHP_VERSION;
} elseif(function_exists('phpversion')) {
$version = phpversion();
} else {
// No version info. I'll lie and hope for the best.
$version = '5.0.0';
}
// Old PHP version detected. EJECT! EJECT! EJECT!
if(!version_compare($version, '5.2.7', '>='))
{
return;
}
/*
* ------------------------------------------------------
* Set the framework
* ------------------------------------------------------
*/
if( !defined('XEF_INCLUDED') )
{
define('XEF_INCLUDED', 1);
}
/*
* ------------------------------------------------------
* Check Joomla version and set the constant
* ------------------------------------------------------
*/
if( !defined('XEF_JVERSION') )
{
if ( version_compare(JVERSION, '2.5', 'ge') && version_compare(JVERSION, '3.0', 'lt') )
{
define('XEF_JVERSION', '25');
}else{
define('XEF_JVERSION', '30');
}
}
/*
* ------------------------------------------------------
* Load the global utilities class
* ------------------------------------------------------
*/
if( !class_exists('XEFUtility') )
{
require_once JPATH_LIBRARIES . '/xef/utility.php';
}
// ------------------------------------------------------
if ( ! function_exists('importSource'))
{
/**
* Import source file by given source name
*
* @params string $name name of the content soruce
*
* @return string $class_name Name of the class
*/
function importSource($name)
{
$path = JPATH_LIBRARIES . '/xef/sources/';
// Class prefix utilize XEF framework
$prefix = 'XEFSource';
// Class name based on given source name
$class_name = $prefix. ucfirst($name);
if( ! class_exists($class_name) )
{
require_once ($path . strtolower($name) . '/' . $name . '.php');
}
return $class_name;
}
}
// ------------------------------------------------------
if ( ! function_exists('curlExist'))
{
function curlExist()
{
}
}