* fix the error of delayed task.
* quote values in between().
This commit is contained in:
@@ -1428,6 +1428,8 @@ class sql
|
||||
public function between($min, $max)
|
||||
{
|
||||
if($this->inCondition and !$this->conditionIsTrue) return $this;
|
||||
$min = $this->quote($min);
|
||||
$max = $this->quote($max);
|
||||
$this->sql .= " BETWEEN $min AND $max ";
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -306,7 +306,7 @@ class taskModel extends model
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->beginIF($type == 'needconfirm')->andWhere('t2.version > t1.storyVersion')->andWhere("t2.status = 'active'")->fi()
|
||||
->beginIF($type == 'assignedtome')->andWhere('t1.assignedTo')->eq($this->app->user->account)->fi()
|
||||
->beginIF($type == 'delayed')->andWhere('deadline')->lt(helper::now())->fi()
|
||||
->beginIF($type == 'delayed')->andWhere('deadline')->between('1970-1-1', helper::now())->fi()
|
||||
->beginIF(strpos('all|needconfirm|assignedtome|delayed', $type) === false)->andWhere('t1.status')->in($type)->fi()
|
||||
->orderBy($orderBy)
|
||||
->page($pager)
|
||||
|
||||
Reference in New Issue
Block a user