* fix task #2651,#2642

This commit is contained in:
jinianlan
2019-07-23 16:00:11 +08:00
parent 0672bc7a0b
commit 77d1853878
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -2611,7 +2611,7 @@ class taskModel extends model
break;
case 'pri':
echo "<span class='label-pri label-pri-" . $task->pri . "' title='" . zget($this->lang->task->priList, $task->pri, $task->pri) . "'>";
周期待办测试2周期待办测试2 echo zget($this->lang->task->priList, $task->pri, $task->pri);
echo zget($this->lang->task->priList, $task->pri, $task->pri);
echo "</span>";
break;
case 'name':
+2 -2
View File
@@ -462,6 +462,7 @@ class todoModel extends model
*/
public function createByCycle($todoList)
{
a($todoList);
$this->loadModel('action');
$today = helper::today();
$now = helper::now();
@@ -490,13 +491,13 @@ class todoModel extends model
$newTodo->assignedBy = $todo->assignedBy;
if($todo->assignedTo) $newTodo->assignedDate = $now;
$date = '';
$start = strtotime($begin);
$finish = strtotime("$today +{$beforeDays} days");
foreach(range($start, $finish, 86400) as $today)
{
$today = date('Y-m-d', $today);
$lastCycle = zget($lastCycleList, $todoID, '');
$date = '';
if($todo->config->type == 'day')
{
@@ -535,7 +536,6 @@ class todoModel extends model
$this->dao->insert(TABLE_TODO)->data($newTodo)->exec();
$this->action->create('todo', $this->dao->lastInsertID(), 'opened', '', '', $newTodo->account);
if($today>$begin) continue;
$lastCycleList[$todoID] = $newTodo;
}
}