Skip to content

Commit

Permalink
Fix bug introduced in recent merge causing problems with monthly rela…
Browse files Browse the repository at this point in the history
…tive repeats
  • Loading branch information
campbell-m committed Aug 8, 2023
1 parent 3c911b8 commit 2322a03
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions web/edit_entry_handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -612,9 +612,18 @@ function invalid_booking(string $message) : void
if ($repeat_rule->getType() != RepeatRule::NONE)
{
$repeat_rule->setInterval($rep_interval);
$repeat_rule->setMonthlyType($month_type);
$repeat_rule->setMonthlyAbsolute($month_absolute);
$repeat_rule->setMonthlyRelative($month_relative);
if ($repeat_rule->getType() == RepeatRule::MONTHLY)
{
$repeat_rule->setMonthlyType($month_type);
if ($repeat_rule->getMonthlyType() == RepeatRule::MONTHLY_ABSOLUTE)
{
$repeat_rule->setMonthlyAbsolute($month_absolute);
}
else
{
$repeat_rule->setMonthlyRelative($month_relative);
}
}
if (isset($rep_end_date))
{
$repeat_end_date = DateTime::createFromFormat('Y-m-d', $rep_end_date);
Expand Down

0 comments on commit 2322a03

Please sign in to comment.