diff options
author | Michael Tänzer <neo@nhng.de> | 2012-04-30 02:33:15 +0200 |
---|---|---|
committer | Michael Tänzer <neo@nhng.de> | 2012-04-30 02:33:15 +0200 |
commit | 5f13d8f7b344b1d806a423eb1daca56724e78ddd (patch) | |
tree | 2fc9ef465b2ef250bbc037a9b3b9df05a8edc0a2 /includes | |
parent | b35b874af560b4c69cf952229b28bd1668dcf5d9 (diff) | |
download | cacert-5f13d8f7b344b1d806a423eb1daca56724e78ddd.tar.gz cacert-5f13d8f7b344b1d806a423eb1daca56724e78ddd.tar.xz cacert-5f13d8f7b344b1d806a423eb1daca56724e78ddd.zip |
Source code taken from cacert-20120429.tar.bz2
Diffstat (limited to 'includes')
-rw-r--r-- | includes/general.php | 4 | ||||
-rw-r--r-- | includes/lib/account.php | 10 |
2 files changed, 6 insertions, 8 deletions
diff --git a/includes/general.php b/includes/general.php index 4919c84..9e2b131 100644 --- a/includes/general.php +++ b/includes/general.php @@ -487,10 +487,6 @@ return(0); } - if($points >= 300) - return(200); - if($points >= 200) - return(150); if($points >= 150) return(35); if($points >= 140) diff --git a/includes/lib/account.php b/includes/lib/account.php index f7a24fa..c7697ce 100644 --- a/includes/lib/account.php +++ b/includes/lib/account.php @@ -19,6 +19,8 @@ function fix_assurer_flag($userID) { + // If requirements for assurers are modified see also scripts/cron/updatesort.php + // Update Assurer-Flag on users table if 100 points. // Should the number of points be SUM(points) or SUM(awarded)? $query = mysql_query('UPDATE `users` AS `u` SET `assurer` = 1 WHERE '. @@ -29,11 +31,11 @@ function fix_assurer_flag($userID) '(SELECT SUM(`points`) FROM `notary` AS `n` WHERE `n`.`to` = `u`.`id` '. 'AND (`n`.`expire` > now() OR `n`.`expire` IS NULL)) >= 100'); // Challenge has been passed and non-expired points >= 100 - + if (!$query) { return false; } - + // Reset flag if requirements are not met $query = mysql_query('UPDATE `users` AS `u` SET `assurer` = 0 WHERE '. '`u`.`id` = \''.(int)intval($userID).'\' AND '. @@ -42,10 +44,10 @@ function fix_assurer_flag($userID) 'AND `cp`.`user_id` = `u`.`id`) OR '. '(SELECT SUM(`points`) FROM `notary` AS `n` WHERE `n`.`to` = `u`.`id` '. 'AND (`n`.`expire` > now() OR `n`.`expire` IS NULL)) < 100)'); - + if (!$query) { return false; } - + return true; }
\ No newline at end of file |