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>
This commit is contained in:
parent
bb3e4e892f
commit
2ed178bdc3
1 changed files with 5 additions and 5 deletions
|
@ -394,14 +394,14 @@ class Default_Model_User {
|
||||||
'assigning challenge to user '.$this->id);
|
'assigning challenge to user '.$this->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($date === null) {
|
|
||||||
$date = new Zend_Date();
|
|
||||||
}
|
|
||||||
|
|
||||||
$challenge = array();
|
$challenge = array();
|
||||||
$challenge['user_id'] = $this->id;
|
$challenge['user_id'] = $this->id;
|
||||||
$challenge['variant_id'] = $variant;
|
$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->db->insert('cats_passed', $challenge);
|
||||||
|
|
||||||
$this->fixAssurerFlag();
|
$this->fixAssurerFlag();
|
||||||
|
|
Loading…
Reference in a new issue