* Fixed an issue where cycle todo can't be created annually.

This commit is contained in:
tianshujie
2023-07-07 14:46:43 +08:00
parent 7c87dbb4ee
commit 105ba64a69
+11 -8
View File
@@ -78,15 +78,18 @@ class todoModel extends model
{
unset($todo->config['week']);
unset($todo->config['month']);
if(!$todo->config['day'])
if(empty($todo->config['specifiedDate']))
{
dao::$errors[] = sprintf($this->lang->error->notempty, $this->lang->todo->cycleDaysLabel);
return false;
}
if(!validater::checkInt($todo->config['day']))
{
dao::$errors[] = sprintf($this->lang->error->int[0], $this->lang->todo->cycleDaysLabel);
return false;
if(!$todo->config['day'])
{
dao::$errors[] = sprintf($this->lang->error->notempty, $this->lang->todo->cycleDaysLabel);
return false;
}
if(!validater::checkInt($todo->config['day']))
{
dao::$errors[] = sprintf($this->lang->error->int[0], $this->lang->todo->cycleDaysLabel);
return false;
}
}
}
if($todo->config['type'] == 'week')