Date validation in the Issue model
This commit is contained in:
parent
2bd2b3a463
commit
fde3a0a949
@ -161,11 +161,9 @@ class IDF_Issue extends Pluf_Model
|
|||||||
if ($this->id == '') {
|
if ($this->id == '') {
|
||||||
$this->creation_dtime = gmdate('Y-m-d H:i:s');
|
$this->creation_dtime = gmdate('Y-m-d H:i:s');
|
||||||
}
|
}
|
||||||
if($this->due_dtime and !empty($this->due_dtime)) {
|
if ($this->due_dtime and !empty($this->due_dtime)) {
|
||||||
$datetime = $this->due_dtime . ' 23:59:59';
|
$this->due_dtime = date('Y-m-d 23:59:59',
|
||||||
if(date('Y-m-d', strtotime($datetime)) === $this->due_dtime) {
|
strtotime($this->due_dtime));
|
||||||
$this->due_dtime = $datetime;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
$this->modif_dtime = gmdate('Y-m-d H:i:s');
|
$this->modif_dtime = gmdate('Y-m-d H:i:s');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user