]> git.mxchange.org Git - mailer.git/blobdiff - inc/filter/bonus_filter.php
Extension ext-coupon continued, a lot improvements applied:
[mailer.git] / inc / filter / bonus_filter.php
index b72d994b6c20ec9b848e4533f72ad070ae96b80d..5faccd7cb23669996c6d5b85697a57ad45248511 100644 (file)
@@ -59,7 +59,7 @@ SET
        `last_login`=UNIX_TIMESTAMP()
 WHERE
        `userid`=%s AND
-       `last_login` < (UNIX_TIMESTAMP() - {?login_timeout?})
+        (UNIX_TIMESTAMP() - `last_login`) >= {?login_timeout?}
 LIMIT 1',
                        array(
                                getMemberId()
@@ -73,7 +73,7 @@ LIMIT 1',
        if (($bonus === true) && (getRequestParameter('mode') == 'bonus')) {
                // Output message with added points
                $GLOBALS['message'] .= '<div class="tiny">{--MEMBER_BONUS_LOGIN_BONUS_ADDED--}</div>';
-       } elseif (isExtensionActive('bonus')) {
+       } else {
                // No login bonus added!
                $GLOBALS['message'] .= '<div class="notice">{--MEMBER_BONUS_LOGIN_BONUS_NOT_ADDED--}</div>';
        }