1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 03:50:54 +01:00

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:
lkassianik 2015-06-08 11:58:45 -07:00
parent 973101cae6
commit ace7505f2e

View file

@ -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())