]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-bonus.php
Migration of stelzi's commit 1022 with some changes so we have a nicer code. See...
[mailer.git] / inc / extensions / ext-bonus.php
index bbe4664e28710a57e61751bf88e0ed59f60db15f..11316d03606945c6d8f02d672770e6f95619b6c2 100644 (file)
@@ -133,7 +133,7 @@ case 'update': // Update an extension
                // Use actual month for this update
                ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000");
                ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000");
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE ext_name='bonus' AND ext_has_css='N' LIMIT 1");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE `ext_name`='bonus' AND ext_has_css='N' LIMIT 1");
 
                // Update notes (these will be set as task text!)
                EXT_SET_UPDATE_NOTES("Login-Bonus und Turbo-Klick-Bonus intergriert.");
@@ -357,8 +357,8 @@ KEY userid (userid)
 
        case '0.5.6': // SQL queries for v0.5.6
                // Get current month
-               $curr = date("m", time());
-               if (strlen($curr) == 1) $curr = "0".$curr;
+               $curr = date('m', time());
+               if (strlen($curr) == 1) $curr = '0'.$curr;
                if ($curr == "00") $curr = "12";
 
                // Generate timemark...
@@ -366,8 +366,8 @@ KEY userid (userid)
 
                // Update accounts which are not active last months
                ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_data`
-SET turbo_bonus=0, login_bonus=0, bonus_order=0, bonus_stats=0, bonus_ref=0
-WHERE last_online < ".$mark." ORDER BY userid");
+SET `turbo_bonus`=0, `login_bonus`=0, `bonus_order`=0, `bonus_stats`=0, `bonus_ref`=0
+WHERE `last_online` < ".$mark." ORDER BY `userid` ASC");
 
                // Update notes (these will be set as task text!)
                EXT_SET_UPDATE_NOTES("Ein weiterer Scriptfehler hat nur die Gewinner aus der Aktiv-Rallye genommen. Die anderen Mitglieder sind somit &quot;nach oben gerutsch&quot;.");