Check if recurrence end date is disabled before saving it.
Summary: Ref T8357, Check if recurrence end date is disabled before saving it. Test Plan: Create new event, before saving, leave "recurrence end date" unchecked, save, should not get an error. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Maniphest Tasks: T8357 Differential Revision: https://secure.phabricator.com/D13212
This commit is contained in:
@@ -201,10 +201,12 @@ final class PhabricatorCalendarEventEditController
|
||||
PhabricatorCalendarEventTransaction::TYPE_FREQUENCY)
|
||||
->setNewValue(array('rule' => $frequency));
|
||||
|
||||
$xactions[] = id(new PhabricatorCalendarEventTransaction())
|
||||
->setTransactionType(
|
||||
PhabricatorCalendarEventTransaction::TYPE_RECURRENCE_END_DATE)
|
||||
->setNewValue($recurrence_end_date_value);
|
||||
if (!$recurrence_end_date_value->isDisabled()) {
|
||||
$xactions[] = id(new PhabricatorCalendarEventTransaction())
|
||||
->setTransactionType(
|
||||
PhabricatorCalendarEventTransaction::TYPE_RECURRENCE_END_DATE)
|
||||
->setNewValue($recurrence_end_date_value);
|
||||
}
|
||||
}
|
||||
|
||||
$xactions[] = id(new PhabricatorCalendarEventTransaction())
|
||||
|
||||
Reference in New Issue
Block a user