]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-theme_import.php
More variables renamed to , install/admin_WriteData() is now generic (with open TODO)
[mailer.git] / inc / modules / admin / what-theme_import.php
index 0ca4421b141cb6bf435d9b55b2cdf2a2d4d2446d..df118063b96f88e5eca1c0b6b987cdc35410ed37 100644 (file)
@@ -36,7 +36,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        $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;
 }
 
@@ -52,7 +52,7 @@ if (!empty($_POST['theme'])) {
        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);
 
@@ -90,13 +90,13 @@ $THEMES = array(
 );
 
 // 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);