Skip to content
Permalink
Browse files

Allow Repeatable Once Entries

This commit fixes a bug where you could have only one "once" entry in a
schedule by allowing it on different days.
  • Loading branch information...
protich committed Nov 20, 2019
1 parent 9ea8e77 commit cb9bb2f97ab72254147cd3d62215108be3c005c4
Showing with 4 additions and 0 deletions.
  1. +4 −0 include/class.schedule.php
@@ -204,6 +204,10 @@ function isEntryUnique($vars, &$errors) {
$keys = array_intersect_key($vars, array_flip(
['repeats', 'day', 'week', 'month']));
$keys['schedule_id'] = $this->getId();
// Once entries can repeat on different dates
if ($keys['repeats'] == 'never')
$keys['starts_on'] = $vars['starts_on'];
$entries= ScheduleEntry::objects()
->filter($keys);
if ($vars['id'])

0 comments on commit cb9bb2f

Please sign in to comment.
You can’t perform that action at this time.