* fix the bug of batchcreate of task.

This commit is contained in:
chencongzhi520@gmail.com
2012-09-03 02:20:24 +00:00
parent e662c95672
commit c0c15e3cc4
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -90,9 +90,10 @@ class taskModel extends model
{
$now = helper::now();
$tasks = fixer::input('post')->get();
$mails = array();
for($i = 0; $i < $this->config->task->batchCreate; $i++)
{
if($tasks->type[$i] != '' and $tasks->name[$i] != '' and $tasks->pri[$i] != 0 and $tasks->estimate[$i] != '')
if($tasks->type[$i] != '' and $tasks->name[$i] != '' and $tasks->pri[$i] != 0)
{
$data[$i]->story = $tasks->story[$i] != 'ditto' ? $tasks->story[$i] : ($i == 0 ? 0 : $data[$i-1]->story);
$data[$i]->type = $tasks->type[$i] == 'ditto' ? ($i == 0 ? '' : $data[$i-1]->type) : $tasks->type[$i];