Fix UserBanCronjob's handling of permanent bans
authorMatthias Schmidt <gravatronics@live.com>
Sat, 28 Jun 2014 10:34:33 +0000 (12:34 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 28 Jun 2014 10:34:33 +0000 (12:34 +0200)
wcfsetup/install/files/lib/system/cronjob/UserBanCronjob.class.php

index 19114c2963b83d58f7b22feec93f700a391f7d9d..bd4852a5621e14923066c6af82a4ae12d3eb12a3 100644 (file)
@@ -25,12 +25,14 @@ class UserBanCronjob extends AbstractCronjob {
                        SET     banned = ?,
                                banExpires = ?
                        WHERE   banned = ?
+                               AND banExpires <> ?
                                AND banExpires <= ?";
                $statement = WCF::getDB()->prepareStatement($sql);
                $statement->execute(array(
                        0,
                        0,
                        1,
+                       0,
                        TIME_NOW
                ));
                
@@ -39,12 +41,14 @@ class UserBanCronjob extends AbstractCronjob {
                        SET     disableAvatar = ?,
                                disableAvatarExpires = ?
                        WHERE   disableAvatar = ?
+                               AND disableAvatarExpires <> ?
                                AND disableAvatarExpires <= ?";
                $statement = WCF::getDB()->prepareStatement($sql);
                $statement->execute(array(
                        0,
                        0,
                        1,
+                       0,
                        TIME_NOW
                ));
                
@@ -53,12 +57,14 @@ class UserBanCronjob extends AbstractCronjob {
                        SET     disableSignature = ?,
                                disableSignatureExpires = ?
                        WHERE   disableSignature = ?
+                               AND disableSignatureExpires <> ?
                                AND disableSignatureExpires <= ?";
                $statement = WCF::getDB()->prepareStatement($sql);
                $statement->execute(array(
                        0,
                        0,
                        1,
+                       0,
                        TIME_NOW
                ));
        }