diff options
author | Michael Tänzer <neo@nhng.de> | 2011-06-30 13:41:26 +0200 |
---|---|---|
committer | Michael Tänzer <neo@nhng.de> | 2011-06-30 13:41:26 +0200 |
commit | 2ed178bdc3ff9e415634be8793c194d35fa66c70 (patch) | |
tree | d2b812202e56849f33cfce93aba88b852974719c | |
parent | bb3e4e892f8bd90f59c3000480776d70449d1eaf (diff) | |
download | cacert-mgr-2ed178bdc3ff9e415634be8793c194d35fa66c70.tar.gz cacert-mgr-2ed178bdc3ff9e415634be8793c194d35fa66c70.tar.xz cacert-mgr-2ed178bdc3ff9e415634be8793c194d35fa66c70.zip |
challenge: if date is not given use the default value from the database
instead of the current time as seen by the manager
Signed-off-by: Michael Tänzer <neo@nhng.de>
-rw-r--r-- | manager/application/models/User.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/manager/application/models/User.php b/manager/application/models/User.php index 7bf4030..27f8a44 100644 --- a/manager/application/models/User.php +++ b/manager/application/models/User.php @@ -394,14 +394,14 @@ class Default_Model_User { 'assigning challenge to user '.$this->id); } - if ($date === null) { - $date = new Zend_Date(); - } - $challenge = array(); $challenge['user_id'] = $this->id; $challenge['variant_id'] = $variant; - $challenge['pass_date'] = $date->toString('Y-m-d H:i:s'); + if ($date !== null) { + $challenge['pass_date'] = $date->toString('Y-m-d H:i:s'); + // otherwise default value of the database will be used + } + $this->db->insert('cats_passed', $challenge); $this->fixAssurerFlag(); |