]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/bonus_functions.php
Removed due to much trouble :(
[mailer.git] / inc / libs / bonus_functions.php
index 5ceee1324997971c3911fa6e26505e4f55a7c0f6..f97467bf1bc37c71e0cec5d5fecb1215045ec220 100644 (file)
@@ -38,11 +38,9 @@ if (!defined('__SECURITY')) {
 }
 
 // This function must be run *BEFORE* a link is removed from table 'mxchange_user_links' !
-function BONUS_ADD_TURBO_POINTS($mid, $uid, $type) {
-       global $_CONFIG;
-
+function BONUS_ADD_TURBO_POINTS ($mid, $uid, $type) {
        // Shall we add bonus points?
-       if (getConfig('bonus_active') == "N") return false;
+       if (getConfig('bonus_active') != "Y") return false;
 
        // Init variables
        $SQL = ""; $bonys = 0; $mail = 0; $column = "";
@@ -112,7 +110,6 @@ function BONUS_ADD_TURBO_POINTS($mid, $uid, $type) {
 }
 //
 function BONUS_MAKE_RANK_ROWS ($data, $type, $uid) {
-       global $_CONFIG;
        $self = false; $OUT = "";
 
        // How many ranks do we have?
@@ -188,10 +185,8 @@ function BONUS_MAKE_RANK_ROWS ($data, $type, $uid) {
 }
 //
 function BONUS_POINTS_HANDLER ($MODE) {
-       global $_CONFIG;
-
        // Shall we add bonus points?
-       if (getConfig('bonus_active') == "N") return;
+       if (getConfig('bonus_active') != "Y") return;
 
        // Switch to jackpot-mode when no UID is supplied but userid-mode is selected
        if ((getConfig('bonus_mode') == "UID") && (getConfig('bonus_uid') == "0")) {
@@ -234,11 +229,9 @@ function BONUS_POINTS_HANDLER ($MODE) {
                break;
        }
 }
-//
-function BONUS_PURGE_EXPIRED_TURBO_BONUS()
-{
-       global $_CONFIG;
 
+//
+function BONUS_PURGE_EXPIRED_TURBO_BONUS() {
        // Remove entries
        $result = SQL_QUERY("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_bonus_turbo` WHERE timemark < (UNIX_TIMESTAMP() - ".getConfig('bonus_timeout').")", __FILE__, __LINE__);
        if (SQL_AFFECTEDROWS() > 0) {