$GLOBALS['cache_array'] = array();
// Skip loading extensions
-if ((!isBooleanConstantAndTrue('mxchange_installed')) || (isBooleanConstantAndTrue('mxchange_installing'))) return;
+if ((!isBooleanConstantAndTrue('mxchange_installed')) || (isInstalling())) {
+ // Init filter system here
+ INIT_FILTER_SYSTEM();
+
+ // Skip loading
+ return;
+} // END - if
// Initialize array for "always keep active extensions"
$GLOBALS['cache_array']['active_extensions'] = array();
$GLOBALS['cacheMode'] = "no";
// Load sql_patchrs extension alone
-LOAD_EXTENSION("sql_patches");
+if (!LOAD_EXTENSION("sql_patches")) {
+ // Could not load sql_patches! ARGH!!!
+ trigger_error("Cannot load extension sql_patches.");
+} // END - if
+
+// Init inc pool array
+$INC_POOL = array();
//
// Load extensions
//
if (EXT_IS_ACTIVE("cache")) {
// Load cache extension alone
- LOAD_EXTENSION("cache");
+ if (!LOAD_EXTENSION("cache")) {
+ // Extension 'cache' was not loaded
+ trigger_error("Cannot load extension cache.");
+ } // END - if
// Check extension cache
switch (($GLOBALS['cache_instance']->loadCacheFile("extensions", true)) && ($GLOBALS['cache_instance']->extensionVersionMatches("sql_patches"))) {
// At least one found?
if ((SQL_NUMROWS($res_ext_crt) > 0) && ((($GLOBALS['cacheMode'] == "init") && ($GLOBALS['output_mode'] != "1") && ($GLOBALS['output_mode'] != "-1")) || ($GLOBALS['cacheMode'] == "no"))) {
- // Load session management
- LOAD_INC_ONCE("inc/session.php");
-
// Extensions are registered so we load them
while ($content = SQL_FETCHARRAY($res_ext_crt)) {
// Get menu entry
// CSS file handling:
if ((!isset($content['ext_css'])) || ($content['ext_css'] == "Y")) {
// Create FQFN for the CSS file
- $GLOBALS['output_mode']_FILE = sprintf("%stheme/%s/css/%s.css", constant('PATH'), GET_CURR_THEME(), $content['ext_name']);
+ $FQFN = sprintf("%stheme/%s/css/%s.css", constant('PATH'), GET_CURR_THEME(), $content['ext_name']);
// Is the file there?
- if (FILE_READABLE($GLOBALS['output_mode']_FILE)) {
+ if (FILE_READABLE($FQFN)) {
// CSS file for extension was found (use only relative path for now!)
EXT_ADD_CSS_FILE($content['ext_name'].".css");
$content['ext_css'] = "Y";