Security line in all includes changed
[mailer.git] / inc / modules / member / what-newsletter.php
index eac7c3265fe4af2f5108cd2667ff420aa822b619..a27073b20cb7ee371a34bd7d5f44030369adb650 100644 (file)
  ************************************************************************/
 
 // Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
-{
+if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
-}
- elseif (!IS_LOGGED_IN())
-{
+} elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
-}
- elseif ((!EXT_IS_ACTIVE("newsletter")) && (!IS_ADMIN()))
-{
+} elseif (!EXT_IS_ACTIVE("newsletter")) {
        ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "newsletter");
        return;
 }