summaryrefslogtreecommitdiff
path: root/manager/application
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2015-07-28 22:37:58 +0200
committerBenny Baumann <BenBE@geshi.org>2015-07-28 22:37:58 +0200
commitdae1d5c7f82c985715e7e6aee9e6355efe560247 (patch)
tree8d92cd3d6fb7a85465f47deb5519f972a16f7c1b /manager/application
parent5a7e58532094a15203a35765f56ebd002a62a005 (diff)
parent1c5bceeae7f572a975ed7c2c17fa4cffce4718a6 (diff)
downloadcacert-mgr-dae1d5c7f82c985715e7e6aee9e6355efe560247.tar.gz
cacert-mgr-dae1d5c7f82c985715e7e6aee9e6355efe560247.tar.xz
cacert-mgr-dae1d5c7f82c985715e7e6aee9e6355efe560247.zip
Merge branch 'bug-1391'
Diffstat (limited to 'manager/application')
-rw-r--r--manager/application/models/User.php16
1 files changed, 2 insertions, 14 deletions
diff --git a/manager/application/models/User.php b/manager/application/models/User.php
index 1e785f1..443dac5 100644
--- a/manager/application/models/User.php
+++ b/manager/application/models/User.php
@@ -108,8 +108,8 @@ class Default_Model_User {
* user's points
*/
public function refreshPoints() {
- $query = 'select sum(`points`) as `total` from `notary` '.
- 'where `to` = :user';
+ $query = "select sum(`points`) as `total` from `notary` " .
+ "where `to` = :user and method != 'Administrative Increase' and from != to";
$query_params['user'] = $this->id;
$row = $this->db->query($query, $query_params)->fetch();
if ($row['total'] === null) $row['total'] = 0;
@@ -297,18 +297,6 @@ class Default_Model_User {
$this->db->insert('notary', $assurance);
$assuree->points += $rounddown;
$assuree->fixAssurerFlag();
-
- if ($this->getPoints() < 150) {
- $addpoints = 0;
- if ($this->getPoints() < 149 && $this->getPoints() >= 100) {
- $addpoints = 2;
- } elseif ($this->getPoints() === 149) {
- $addpoints = 1;
- }
-
- $this->adminIncrease($addpoints, $location, $date);
- }
-
return $rounddown;
}