$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!EXT_IS_ACTIVE("theme")) {
- addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "theme"));
+ addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "theme");
return;
}
if (!THEME_CHECK_EXIST($_POST['theme'])) {
// Import theme
$INC = sprintf("theme/%s/theme.php", SQL_ESCAPE($_POST['theme']));
- if (FILE_READABLE($INC)) {
+ if (INCLUDE_READABLE($INC)) {
// Load the theme header file
LOAD_INC($INC);
);
// Read directory "themes"
-$handle = opendir(PATH."theme/") or mxchange_die("Cannot read themes dir!");
+$handle = opendir(constant('PATH')."theme/") or mxchange_die("Cannot read themes dir!");
while ($dir = readdir($handle)) {
// Construct absolute theme.php file name
$INC = sprintf("theme/%s/theme.php", $dir);
// Test it...
- if (($dir != ".") && ($dir != "..") && (FILE_READABLE($INC))) {
+ if (($dir != ".") && ($dir != "..") && (INCLUDE_READABLE($INC))) {
// Found a valid directory so let's load it's theme.php file
LOAD_INC($INC);