$cacheInstance->destroyCacheFile();
// Retry it
- require(__FILE__);
+ LOAD_INC(__FILE__);
return;
} // END - if
// No database load needed
$res_ext_crt = false;
- // Load more cache files (like admins)
- require_once(PATH."inc/load_cache.php");
-
// Load all extension files
foreach ($EXT_POOL as $ext) {
LOAD_EXTENSION($ext);
} // END - foreach
+ // Init filter system
+ INIT_FILTER_SYSTEM();
+
+ // Load more cache files (like admins)
+ LOAD_INC_ONCE("inc/load_cache.php");
+
// Remove array
unset($EXT_POOL);
} else {
if (GET_EXT_VERSION("sql_patches") >= "0.0.6") {
// Query with CSS file from DB
$res_ext_crt = SQL_QUERY("SELECT id AS ext_id, ext_name, ext_has_css AS ext_css, ext_active, ext_version
-FROM "._MYSQL_PREFIX."_extensions".$ADD."
+FROM `{!_MYSQL_PREFIX!}_extensions`".$ADD."
ORDER BY ext_name", __FILE__, __LINE__);
} else {
// Old obsolete query string
$res_ext_crt = SQL_QUERY("SELECT id AS ext_id, ext_name, ext_name, ext_active, ext_version
-FROM "._MYSQL_PREFIX."_extensions".$ADD."
+FROM `{!_MYSQL_PREFIX!}_extensions`".$ADD."
ORDER BY ext_name", __FILE__, __LINE__);
}
}
// At least one found?
if ((SQL_NUMROWS($res_ext_crt) > 0) && ((($cacheMode == "init") && ($CSS != "1") && ($CSS != "-1")) || ($cacheMode == "no"))) {
// Load session management
- require_once(PATH."inc/session.php");
+ LOAD_INC_ONCE("inc/session.php");
// Extensions are registered so we load them
while ($content = SQL_FETCHARRAY($res_ext_crt)) {
} // END - if
// Load extensions
- $file1 = sprintf("%sinc/extensions/ext-%s.php", PATH, $content['ext_name']);
- $EXT_CSS = "N"; $EXT_ALWAYS_ACTIVE = "N";
+ $file1 = sprintf("%sinc/extensions/ext-%s.php", constant('PATH'), $content['ext_name']);
// Does the extension file exists?
if (FILE_READABLE($file1)) {
// CSS file handling:
if ((!isset($content['ext_css'])) || ($content['ext_css'] == "Y")) {
// Create FQFN for the CSS file
- $CSS_FILE = sprintf("%stheme/%s/css/%s.css", PATH, GET_CURR_THEME(), $content['ext_name']);
+ $CSS_FILE = sprintf("%stheme/%s/css/%s.css", constant('PATH'), GET_CURR_THEME(), $content['ext_name']);
// Is the file there?
if (FILE_READABLE($CSS_FILE)) {
}
} // END - while
+ // Init filter system
+ INIT_FILTER_SYSTEM();
+
if ($cacheMode == "init") {
// Close cache file
$cacheInstance->finalize();
// Load more cache files (like admins)
- require_once(PATH."inc/load_cache.php");
+ LOAD_INC_ONCE("inc/load_cache.php");
} // END - if
// Free memory
SQL_FREERESULT($res_ext_crt);
-} // END - if
+} elseif (!EXT_IS_ACTIVE("cache")) {
+ // Init filter system even when there are no extensions installed. #16
+ INIT_FILTER_SYSTEM();
+}
// Run the filter
RUN_FILTER('load_includes', $INC_POOL);
// Remove extensions from two tables: extension registry and tasks table
foreach ($DEL as $del_ext) {
// First remove entry from extensions table
- SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_extensions WHERE ext_name='%s' LIMIT 1",
+ SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_extensions` WHERE ext_name='%s' LIMIT 1",
array($del_ext), __FILE__, __LINE__);
// Remove (maybe?) found tasks (main task and possible updates
- SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_task_system WHERE subject='[%s:]' AND (task_type='EXTENSION' OR task_type='EXTENSION_UPDATE')",
+ SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_task_system` WHERE subject='[%s:]' AND (task_type='EXTENSION' OR task_type='EXTENSION_UPDATE')",
array($del_ext), __FILE__, __LINE__);
} // END - foreach