]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-beg.php
- Daily/weekly/monthly reset completely rewritten
[mailer.git] / inc / extensions / ext-beg.php
index ab6b8826f8212f1e95be39a8214ec4c2233f0211..76b1042c10ce4f70fcf4a2d442f24ea360233825 100644 (file)
@@ -154,14 +154,8 @@ case "update": // Update an extension
                break;
 
        case "0.1.2":
-               // Get current month
-               $curr = date("m", time());
-               if (strlen($curr) == 1) $curr = "0".$curr;
-               if ($curr == "00") $curr = "12";
-
                // SQL queries for v0.1.2
                $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_mode ENUM('DIRECT', 'REF') NOT NULL DEFAULT 'REF'";
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_month CHAR(2) NOT NULL DEFAULT '".$curr."'";
                $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_ranks TINYINT(3) NOT NULL DEFAULT '10'";
                $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_active ENUM('Y', 'N') NOT NULL DEFAULT 'N'";
                $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_rallye ENUM('Y', 'N') NOT NULL DEFAULT 'N'";
@@ -268,24 +262,8 @@ default: // Do stuff when extension is loaded
        if ($_CONFIG['beg_uid_timeout'] > $OLD) $OLD = $_CONFIG['beg_uid_timeout'];
        $result_ext = SQL_QUERY("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_beg_ips WHERE timeout < ".(time() - $OLD - 60*60), __FILE__, __LINE__);
 
-       if (isBooleanConstantAndTrue('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1))
-       {
-               // Daily reset was run so let's check if begging rallye is active
-               if ($_CONFIG['beg_rallye'] == "Y")
-               {
-                       // Check for our winers
-                       $INC_POOL[] = sprintf("%sinc/monthly/monthly_beg.php", PATH);
-               }
-                else
-               {
-                       // Reset begging points
-                       $INC_POOL[] = sprintf("inc/reset/reset_beg.php", PATH);
-               }
-       }
-
        // Check for beg rallye is active and send mails out
-       if (($_CONFIG['beg_rallye'] == "Y") && ($_CONFIG['beg_new_mem_notify'] == "Y"))
-       {
+       if (($_CONFIG['beg_rallye'] == "Y") && ($_CONFIG['beg_new_mem_notify'] == "Y")) {
                // Include file for sending out mails
                $INC_POOL[] = sprintf("%sinc/mails/beg_mails.php", PATH);
        }