if ((!isBooleanConstantAndTrue('mxchange_installed')) || (isBooleanConstantAndTrue('mxchange_installing'))) return;
// Load default sql_patches extension if present
-if (file_exists(PATH."inc/extensions/ext-sql_patches.php") && is_readable(PATH."inc/extensions/ext-sql_patches.php")) {
+if (FILE_READABLE(PATH."inc/extensions/ext-sql_patches.php")) {
// Load it...
$EXT_LOAD_MODE = "";
require_once(PATH."inc/extensions/ext-sql_patches.php");
// Load extension data from cache file
$EXT_DUMMY = $cacheInstance->cache_load();
$EXT_NAMES = array();
- foreach ($EXT_DUMMY['ext_name'] as $k=>$name) {
+ foreach ($EXT_DUMMY['ext_name'] as $k => $name) {
// Load functions file
if ($EXT_DUMMY['ext_funcs'][$k] == "Y") {
require_once(PATH."inc/libs/".$name."_functions.php");
// Load Language file
if ($EXT_DUMMY['ext_lang'][$k] == "Y") {
$INC = sprintf("%sinc/language/%s_%s.php", PATH, $name, GET_LANGUAGE());
- if (file_exists($INC)) require_once($INC);
+ if (FILE_READABLE($INC)) require_once($INC);
} // END - if
// Load CSS file
while (list($EXT_ID, $name, $lang, $css, $active, $version) = SQL_FETCHROW($res_ext_crt)) {
// Get menu entry
$menu = "N";
- if (MODULE_HAS_MENU($name)) {
+ if (MODULE_HAS_MENU($name, true)) {
$menu = "Y";
} // END - if
$file3 = sprintf("%sinc/libs/%s_functions.php", PATH, $name);
// Does the extension file exists?
- if (file_exists($file1) && is_readable($file1)) {
+ if (FILE_READABLE($file1)) {
// If there's no language file specified we don't need to load one... ;-)
if (!empty($lang)) {
// Create language file
$file2 = sprintf("%sinc/language/%s_%s.php", PATH, $lang, GET_LANGUAGE());
}
- if (file_exists($file3) && is_readable($file3)) {
+ if (FILE_READABLE($file3)) {
// Special functions file
$funcs = "Y";
require_once($file3);
}
// Do we need a language file?
- if (($file1 != $file2) && (file_exists($file2)) && (is_readable($file2))) {
+ if (($file1 != $file2) && (FILE_READABLE($file2))) {
// Load language file
$lang = "Y";
include($file2);
if ($css == "Y") {
$CSS_FILE = sprintf("%stheme/%s/css/%s.css", PATH, GET_CURR_THEME(), $name);
- if (file_exists($CSS_FILE)) {
+ if (FILE_READABLE($CSS_FILE)) {
// CSS file for extension was found (use only relative path for now!)
$EXT_CSS_FILES[] = $name.".css";
} else {
// Remember this value for later usage
$cacheArray['active_extensions'][$name] = $EXT_ALWAYS_ACTIVE;
}
- } elseif (!file_exists($file1)) {
+ } elseif (!FILE_READABLE($file1)) {
// Deleted extension file so we mark it for removal from DB
$DEL[] = $name;
}