Security line in all includes changed
[mailer.git] / inc / modules / admin / what-updates.php
index aacab360913fc171609b04300adb617d413381ee..e6fd292ee9039ee4bde973f18e74c8577a9d404d 100644 (file)
@@ -32,7 +32,7 @@
  ************************************************************************/
 
 // Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 }
@@ -85,7 +85,7 @@ if (empty($response[0]) && empty($response[1]) && empty($response[2]) && empty($
 
                if (($response[3] != "[EOF]") && ($ONLINE['version'] == FULL_VERSION)) {
                        // We have found new patches (newer than FULL_VERSION)
-                       $max = str_replace("\n", "", $response[sizeof($response) - 2]); $TOTAL_SIZE = "0";
+                       $max = str_replace("\n", "", $response[sizeof($response) - 2]); $TOTAL_SIZE = 0;
 
                        // Maximum of available pacthes extracted (above). Now we can get all informations
                        for ($idx = 0; $idx < $max; $idx++) {