upd: fixup for includes/lib/account for administrative-increase-assurances
authorFelix Dörre <felix@dogcraft.de>
Sun, 19 Apr 2015 13:09:45 +0000 (15:09 +0200)
committerFelix Dörre <felix@dogcraft.de>
Tue, 21 Apr 2015 19:14:04 +0000 (21:14 +0200)
includes/lib/account.php

index aab98a4..6e17dda 100644 (file)
@@ -49,7 +49,7 @@ function fix_assurer_flag($userID = NULL)
                        )
                        AND (
                                SELECT SUM(`awarded`) FROM `notary` AS `n`
-                               WHERE `n`.`to` = `u`.`id`
+                               WHERE `n`.`to` = `u`.`id` AND `n`.`method` != 'Administrative Increase' AND `n`.`from` != `n`.`to`
                                        AND (`n`.`expire` > now()
                                             OR `n`.`expire` IS NULL)
                                        AND `n`.`deleted` = 0
@@ -82,7 +82,7 @@ function fix_assurer_flag($userID = NULL)
                                )
                                OR (
                                        SELECT SUM(`awarded`) FROM `notary` AS `n`
-                                       WHERE `n`.`to` = `u`.`id`
+                                       WHERE `n`.`to` = `u`.`id` AND `n`.`method` != 'Administrative Increase' AND `n`.`from` != `n`.`to`
                                                AND (
                                                        `n`.`expire` > now()
                                                        OR `n`.`expire` IS NULL