* Fix bug #49313.
This commit is contained in:
@@ -185,6 +185,7 @@ class todo extends control
|
||||
/* Save the todo data for batch edit. */
|
||||
if($from == 'todoBatchEdit')
|
||||
{
|
||||
$this->config->todo->edit->requiredFields = str_replace(',name,', ',', ",{$this->config->todo->edit->requiredFields},");
|
||||
$formData = form::batchData($this->config->todo->batchEdit->form)->get();
|
||||
$todos = $this->todoZen->beforeBatchEdit($formData);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
+6
-5
@@ -488,17 +488,18 @@ class todoZen extends todo
|
||||
{
|
||||
$todo->objectID = $todo->{$todo->type};
|
||||
$todo->name = '';
|
||||
if(empty($todo->objectID)) dao::$errors["{$todo->type}[{$todoID}]"] = sprintf($this->lang->error->notempty, $this->lang->todo->name);
|
||||
}
|
||||
elseif(empty($todo->name))
|
||||
{
|
||||
dao::$errors["name[{$todoID}]"] = sprintf($this->lang->error->notempty, $this->lang->todo->name);
|
||||
}
|
||||
unset($todo->story, $todo->task, $todo->bug, $todo->testtask);
|
||||
|
||||
$todo->begin = empty($todo->begin) || $this->post->switchTime ? 2400 : $todo->begin;
|
||||
$todo->end = empty($todo->end) || $this->post->switchTime ? 2400 : $todo->end;
|
||||
|
||||
if($todo->end < $todo->begin)
|
||||
{
|
||||
dao::$errors["begin[{$todoID}]"] = sprintf($this->lang->error->gt, $this->lang->todo->end, $this->lang->todo->begin);
|
||||
continue;
|
||||
}
|
||||
if($todo->end < $todo->begin) dao::$errors["begin[{$todoID}]"] = sprintf($this->lang->error->gt, $this->lang->todo->end, $this->lang->todo->begin);
|
||||
}
|
||||
|
||||
return $todos;
|
||||
|
||||
Reference in New Issue
Block a user