Page MenuHomePhabricator

D16753.id.diff
No OneTemporary

D16753.id.diff

diff --git a/src/applications/calendar/editor/PhabricatorCalendarEventEditEngine.php b/src/applications/calendar/editor/PhabricatorCalendarEventEditEngine.php
--- a/src/applications/calendar/editor/PhabricatorCalendarEventEditEngine.php
+++ b/src/applications/calendar/editor/PhabricatorCalendarEventEditEngine.php
@@ -164,6 +164,8 @@
if ($this->getIsCreate() || $object->getIsRecurring()) {
$fields[] = id(new PhabricatorEpochEditField())
+ ->setIsLockable(false)
+ ->setIsDefaultable(false)
->setAllowNull(true)
->setKey('until')
->setLabel(pht('Repeat Until'))
@@ -189,6 +191,8 @@
$fields[] = id(new PhabricatorEpochEditField())
->setKey('start')
->setLabel(pht('Start'))
+ ->setIsLockable(false)
+ ->setIsDefaultable(false)
->setTransactionType(
PhabricatorCalendarEventStartDateTransaction::TRANSACTIONTYPE)
->setDescription(pht('Start time of the event.'))
@@ -199,6 +203,8 @@
$fields[] = id(new PhabricatorEpochEditField())
->setKey('end')
->setLabel(pht('End'))
+ ->setIsLockable(false)
+ ->setIsDefaultable(false)
->setTransactionType(
PhabricatorCalendarEventEndDateTransaction::TRANSACTIONTYPE)
->setDescription(pht('End time of the event.'))
diff --git a/src/applications/transactions/storage/PhabricatorEditEngineConfiguration.php b/src/applications/transactions/storage/PhabricatorEditEngineConfiguration.php
--- a/src/applications/transactions/storage/PhabricatorEditEngineConfiguration.php
+++ b/src/applications/transactions/storage/PhabricatorEditEngineConfiguration.php
@@ -128,6 +128,9 @@
$values = $this->getProperty('defaults', array());
foreach ($fields as $key => $field) {
+ if (!$field->getIsDefaultable()) {
+ continue;
+ }
if ($is_new) {
if (array_key_exists($key, $values)) {
$field->readDefaultValueFromConfiguration($values[$key]);
@@ -157,6 +160,11 @@
}
}
+ // If the field isn't lockable, remove any lock we applied.
+ if (!$field->getIsLockable()) {
+ $field->setIsLocked(false);
+ }
+
$fields = $this->reorderFields($fields);
$preamble = $this->getPreamble();

File Metadata

Mime Type
text/plain
Expires
Oct 18 2024, 12:00 PM (4 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6726743
Default Alt Text
D16753.id.diff (2 KB)

Event Timeline