More queries now depends on UNIX_TIMESTAMP() SQL function, wrong index in autopurge...
[mailer.git] / inc / modules / admin / what-admins_add.php
index bb740c380eefb0837e2ce6f4e05cd90b0588cade..27956bc37fab19c2a7c8287bb31b4427daddd995 100644 (file)
  ************************************************************************/
 
 // 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);
 }
+
 // Add description as navigation point
 ADD_DESCR("admin", basename(__FILE__));
 
-global $CACHE;
+global $cacheInstance;
 
 // Display form is default
 $FORM = true;
@@ -63,7 +63,7 @@ if ((isset($_POST['add'])) && (!empty($_POST['login'])) && (!empty($_POST['email
                // Remove cache file
                if (EXT_IS_ACTIVE("cache"))
                {
-                       if ($CACHE->cache_file("admins", true)) $CACHE->cache_destroy();
+                       if ($cacheInstance->cache_file("admins", true)) $cacheInstance->cache_destroy();
                }
        }
         else