X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fmember%2Fwhat-bonus.php;h=9a223e9a2023f2f15f22d1e4e9fc0d4e0c2a92c0;hb=d6834211baacaa54b282898fe54dc8c1511f046b;hp=f34c4ab80b8fa093166bd6fb8fe2decf83980b2e;hpb=41e2891fb998d13b22b8d7984358f258cc85267d;p=mailer.git diff --git a/inc/modules/member/what-bonus.php b/inc/modules/member/what-bonus.php index f34c4ab80b..9a223e9a20 100644 --- a/inc/modules/member/what-bonus.php +++ b/inc/modules/member/what-bonus.php @@ -32,23 +32,18 @@ ************************************************************************/ // 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_MEMBER()) -{ +} elseif (!IS_MEMBER()) { LOAD_URL("modules.php[5~?module=index"); -} - elseif ((!EXT_IS_ACTIVE("bonus")) && (!IS_ADMIN())) -{ +} elseif (!EXT_IS_ACTIVE("bonus")) ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "bonus"); return; } // Add description as navigation point -ADD_DESCR("member", basename(__FILE__)); +ADD_DESCR("member", __FILE__); if (GET_EXT_VERSION("bonus") >= "0.6.9") { @@ -69,11 +64,10 @@ if (GET_EXT_VERSION("bonus") >= "0.6.9") // Autopurge installed? $LAST = "%s"; $ONLINE = ""; -if (EXT_IS_ACTIVE("autopurge")) -{ +if (EXT_IS_ACTIVE("autopurge")) { // Use last online timestamp to keep inactive members away from here - $LAST = " AND last_online >= %s"; - $ONLINE = bigintval(time() - $_CONFIG['ap_in_since']); + $LAST = " AND last_online >= (UNIX_TIMESTAMP() - %s)"; + $ONLINE = $_CONFIG['ap_inactive_since']; } // Let's check if there are some points left we can "pay"...