* Fix bug#14578

This commit is contained in:
zenggang
2021-09-03 09:57:12 +08:00
parent 2a68d2ac83
commit 97e6ea501a
+11
View File
@@ -75,6 +75,11 @@ class todoModel extends model
{
unset($todo->config['week']);
unset($todo->config['month']);
if($todo->config['day'] and !validater::checkInt($todo->config['day']))
{
dao::$errors[] = sprintf($this->lang->error->int[0], $this->lang->todo->cycleDay);
return false;
}
}
if($todo->config['type'] == 'week')
{
@@ -88,6 +93,12 @@ class todoModel extends model
unset($todo->config['week']);
$todo->config['month'] = join(',', $todo->config['month']);
}
if($todo->config['beforeDays'] and !validater::checkInt($todo->config['beforeDays']))
{
dao::$errors[] = sprintf($this->lang->error->int[0], $this->lang->todo->cycleDay);
return false;
}
$todo->config['beforeDays'] = (int)$todo->config['beforeDays'];
$todo->config = json_encode($todo->config);
$todo->type = 'cycle';