]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-theme_check.php
Improvements to task extension
[mailer.git] / inc / modules / admin / what-theme_check.php
index 99df9a41061a7e6e17cb40c9432f89919e6caef0..acef17b946a8c423c421a6a1943709ea726bdcb7 100644 (file)
@@ -47,7 +47,7 @@ $mode = "overview";
 $SEL = "0";
 
 // Get response from our server
-$response = MXCHANGE_OPEN("check-themes.php");
+$response = GET_URL("check-themes.php");
 
 // Are theme_check found?
 if (($response[sizeof($response) - 1] == "[EOF]") && ($response[0] != "[EOF]"))
@@ -72,7 +72,7 @@ if (($response[sizeof($response) - 1] == "[EOF]") && ($response[0] != "[EOF]"))
                if ((substr($value, 0, 6) == "theme-") && (substr($value, -4) == ".zip"))
                {
                        $name = substr($value, 6, -4);
-                       $file = PATH."themes/".$name."/theme.php";
+                       $file = sprintf("%sthemes/%s/theme.php", PATH, $name);
                        $ver = trim(substr($response[$idx + 3], 4));
 
                        // Load version
@@ -101,18 +101,18 @@ if (($response[sizeof($response) - 1] == "[EOF]") && ($response[0] != "[EOF]"))
                                        $LANG_DUMMY[$k] = $v;
                                        if ($v == "xx:xx") break;
                                        $LANG[] = $v;
-                               }
+                               } // END - foreach
 
                                // If language is found stop searching on matching line
                                foreach($LANG as $search) {
                                        if (substr($search, 0, 3) == (GET_LANGUAGE().":")) { $INFO = substr($search, 3); break; }
-                               }
+                               } // END - foreach
 
                                // Add informations to array
                                $THEMES['infos'][] = $INFO;
-                       }
-               }
-       }
+                       } // END - if
+               } // END - if
+       } // END - foreach
 
        // Ok, themes are on our server but maybe you have already installed them?
        if (sizeof($THEMES['fname']) > 0) {
@@ -146,17 +146,14 @@ if (($response[sizeof($response) - 1] == "[EOF]") && ($response[0] != "[EOF]"))
 
                // Load template
                LOAD_TEMPLATE("admin_theme_list");
-       }
-        else
-       {
+       } else {
                // All Themes are downloaded and installed
                LOAD_TEMPLATE("admin_theme_installed", false, $count);
        }
-}
- else
-{
+} else {
        // No theme where found
        LOAD_TEMPLATE("admin_theme_404");
 }
+
 //
 ?>