]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-config_secure.php
Cache class rewritten to better convention
[mailer.git] / inc / modules / admin / what-config_secure.php
index 2ad3c4bf37f2fcc1c6067aa07edb55ccaa02900f..2f9e327ce6157f5fbb84e21ff3c845b762fba180 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);
 }
-global $link;
-
 // Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
 
 if (isset($_POST['ok']))
 {
@@ -54,7 +51,7 @@ if (isset($_POST['ok']))
                unset($_POST['salt_length']);
 
                // Redirect to logout link
-               LOAD_URL(URL."/modules.php?module=admin&logout=1");
+               LOAD_URL("modules.php?module=admin&logout=1");
        }
 
        // Save settings
@@ -63,10 +60,10 @@ if (isset($_POST['ok']))
  else
 {
        // Remember stuff in constants
-       define('__PASS_LEN'   , $CONFIG['pass_len']);
+       define('__PASS_LEN'   , $_CONFIG['pass_len']);
 
        // Password-salt length
-       define('__SALT_LENGTH', $CONFIG['salt_length']);
+       define('__SALT_LENGTH', $_CONFIG['salt_length']);
 
        // Load template
        LOAD_TEMPLATE("admin_config_secure");