Tons of rewrites (SQL queries), surfbar nearly finished (working: surfing with static...
[mailer.git] / inc / modules / admin / what-theme_check.php
index 99df9a41061a7e6e17cb40c9432f89919e6caef0..62eca499eef0f77d7aacbcc5cf02603486b2236c 100644 (file)
@@ -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");
 }
+
 //
 ?>