]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-rallyes.php
Fixes for rallye extension, refs are now no longer removed from rallye if ref was...
[mailer.git] / inc / modules / member / what-rallyes.php
index 6a95c086fe8fff098ff41cc3176aa60bd8725283..b86019f896ea887aff907ccb7f3a9856b41228a0 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())
-{
-       LOAD_URL(URL."/modules.php?module=index");
-}
- elseif ((!EXT_IS_ACTIVE("rallye")) && (!IS_ADMIN()))
-{
+} elseif (!IS_MEMBER()) {
+       LOAD_URL("modules.php?module=index");
+} elseif (!EXT_IS_ACTIVE("rallye")) {
        ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "rallye");
        return;
 }
@@ -73,7 +68,7 @@ if (SQL_NUMROWS($result) == 1)
                define('__RALLYE_EXTRAS', RALLYE_HAS_EXPIRED);
                $expired = true;
        }
-        elseif (time() >= ($end - ONE_DAY))
+        elseif (time() >= ($end - $_CONFIG['one_day']))
        {
                // Rallye will expire in less one day!
                define('__RALLYE_EXTRAS', RALLYE_EXPIRE_ONE_DAY);