]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-theme_import.php
ADMIN_MEMBER_SELECTION_BOX() does now return a select-tag with the member list
[mailer.git] / inc / modules / admin / what-theme_import.php
index 775f6f493f5b6f48ed51af0fce29b9639601ea4d..ff47824ed7dd058923744ca6658ca384d3c1e733 100644 (file)
@@ -53,7 +53,7 @@ if (!empty($_POST['theme']))
        {
                // Import theme
                $file = sprintf("%stheme/%s/theme.php", PATH, SQL_ESCAPE($_POST['theme']));
-               if ((file_exists($file)) && (is_readable($file))) {
+               if (FILE_READABLE($file)) {
                        // Load the theme header file
                        include($file);
 
@@ -96,7 +96,7 @@ while ($dir = readdir($handle)) {
        $theme = sprintf("%stheme/%s/theme.php", PATH, $dir);
 
        // Test it...
-       if (($dir != ".") && ($dir != "..") && (file_exists($theme)) && (is_readable($theme))) {
+       if (($dir != ".") && ($dir != "..") && (FILE_READABLE($theme))) {
                // Found a valid directory so let's load it's theme.php file
                include($theme);
 
@@ -107,8 +107,10 @@ while ($dir = readdir($handle)) {
                $THEMES['theme_email'][]  = $THEME_EMAIL;
                $THEMES['theme_url'][]    = $THEME_URL;
                $THEMES['theme_ver'][]    = $THEME_VERSION;
-       }
-}
+       } // END - if
+} // END - while
+
+// Close directory
 closedir($handle);
 
 // Sort array by Uni* name
@@ -116,7 +118,7 @@ array_pk_sort($THEMES, array("theme_name"));
 
 // Generate output lines for the template
 $OUT = ""; $SW = 2;
-foreach ($THEMES['theme_unix'] as $key=>$unix) {
+foreach ($THEMES['theme_unix'] as $key => $unix) {
        // Check if current theme is already imported or not
        $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_themes WHERE theme_path='%s' LIMIT 1",
         array($unix), __FILE__, __LINE__);