Page MenuHomePhabricator

D16789.diff
No OneTemporary

D16789.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -384,7 +384,6 @@
'rsrc/js/application/calendar/behavior-day-view.js' => '4b3c4443',
'rsrc/js/application/calendar/behavior-event-all-day.js' => 'b41537c9',
'rsrc/js/application/calendar/behavior-month-view.js' => 'fe33e256',
- 'rsrc/js/application/calendar/behavior-recurring-edit.js' => '5f1c4d5f',
'rsrc/js/application/config/behavior-reorder-fields.js' => 'b6993408',
'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => '358c717b',
'rsrc/js/application/conpherence/behavior-conpherence-search.js' => '9bbf3762',
@@ -704,7 +703,6 @@
'javelin-behavior-project-create' => '065227cc',
'javelin-behavior-quicksand-blacklist' => '7927a7d3',
'javelin-behavior-read-only-warning' => 'ba158207',
- 'javelin-behavior-recurring-edit' => '5f1c4d5f',
'javelin-behavior-refresh-csrf' => 'ab2f381b',
'javelin-behavior-releeph-preview-branch' => 'b2b4fbaf',
'javelin-behavior-releeph-request-state-change' => 'a0b57eb8',
diff --git a/resources/sql/autopatches/20161101.calendar.02.removecolumns.sql b/resources/sql/autopatches/20161101.calendar.02.removecolumns.sql
new file mode 100644
--- /dev/null
+++ b/resources/sql/autopatches/20161101.calendar.02.removecolumns.sql
@@ -0,0 +1,17 @@
+ALTER TABLE {$NAMESPACE}_calendar.calendar_event
+ DROP allDayDateFrom;
+
+ALTER TABLE {$NAMESPACE}_calendar.calendar_event
+ DROP allDayDateTo;
+
+ALTER TABLE {$NAMESPACE}_calendar.calendar_event
+ DROP dateFrom;
+
+ALTER TABLE {$NAMESPACE}_calendar.calendar_event
+ DROP dateTo;
+
+ALTER TABLE {$NAMESPACE}_calendar.calendar_event
+ DROP recurrenceEndDate;
+
+ALTER TABLE {$NAMESPACE}_calendar.calendar_event
+ DROP recurrenceFrequency;
diff --git a/src/applications/calendar/storage/PhabricatorCalendarEvent.php b/src/applications/calendar/storage/PhabricatorCalendarEvent.php
--- a/src/applications/calendar/storage/PhabricatorCalendarEvent.php
+++ b/src/applications/calendar/storage/PhabricatorCalendarEvent.php
@@ -52,14 +52,6 @@
private $viewerTimezone;
- // TODO: DEPRECATED. Remove once we're sure the migrations worked.
- protected $allDayDateFrom;
- protected $allDayDateTo;
- protected $dateFrom;
- protected $dateTo;
- protected $recurrenceEndDate;
- protected $recurrenceFrequency = array();
-
private $isGhostEvent = false;
private $stubInvitees;
@@ -95,10 +87,6 @@
->setEditPolicy($edit_policy)
->setSpacePHID($actor->getDefaultSpacePHID())
->attachInvitees(array())
- ->setDateFrom(0)
- ->setDateTo(0)
- ->setAllDayDateFrom(0)
- ->setAllDayDateTo(0)
->setStartDateTime($datetime_start)
->setEndDateTime($datetime_end)
->attachImportSource(null)
@@ -154,11 +142,7 @@
->setSequenceIndex($sequence)
->setIsRecurring(true)
->attachParentEvent($this)
- ->attachImportSource(null)
- ->setAllDayDateFrom(0)
- ->setAllDayDateTo(0)
- ->setDateFrom(0)
- ->setDateTo(0);
+ ->attachImportSource(null);
return $child->copyFromParent($actor, $start);
}
@@ -421,18 +405,8 @@
'importSourcePHID' => 'phid?',
'importUIDIndex' => 'bytes12?',
'importUID' => 'text?',
-
- // TODO: DEPRECATED.
- 'allDayDateFrom' => 'epoch',
- 'allDayDateTo' => 'epoch',
- 'dateFrom' => 'epoch',
- 'dateTo' => 'epoch',
- 'recurrenceEndDate' => 'epoch?',
),
self::CONFIG_KEY_SCHEMA => array(
- 'key_date' => array(
- 'columns' => array('dateFrom', 'dateTo'),
- ),
'key_instance' => array(
'columns' => array('instanceOfEventPHID', 'sequenceIndex'),
'unique' => true,
@@ -449,7 +423,6 @@
),
),
self::CONFIG_SERIALIZATION => array(
- 'recurrenceFrequency' => self::SERIALIZATION_JSON,
'parameters' => self::SERIALIZATION_JSON,
),
) + parent::getConfiguration();
@@ -845,12 +818,7 @@
public function newStartDateTime() {
$datetime = $this->getParameter('startDateTime');
- if ($datetime) {
- return $this->newDateTimeFromDictionary($datetime);
- }
-
- $epoch = $this->getDateFrom();
- return $this->newDateTimeFromEpoch($epoch);
+ return $this->newDateTimeFromDictionary($datetime);
}
public function getStartDateTimeEpoch() {
@@ -859,12 +827,7 @@
public function newEndDateTimeForEdit() {
$datetime = $this->getParameter('endDateTime');
- if ($datetime) {
- return $this->newDateTimeFromDictionary($datetime);
- }
-
- $epoch = $this->getDateTo();
- return $this->newDateTimeFromEpoch($epoch);
+ return $this->newDateTimeFromDictionary($datetime);
}
public function newEndDateTime() {
@@ -896,11 +859,7 @@
return $this->newDateTimeFromDictionary($datetime);
}
- $epoch = $this->getRecurrenceEndDate();
- if (!$epoch) {
- return null;
- }
- return $this->newDateTimeFromEpoch($epoch);
+ return null;
}
public function getUntilDateTimeEpoch() {
diff --git a/src/applications/calendar/xaction/PhabricatorCalendarEventUntilDateTransaction.php b/src/applications/calendar/xaction/PhabricatorCalendarEventUntilDateTransaction.php
--- a/src/applications/calendar/xaction/PhabricatorCalendarEventUntilDateTransaction.php
+++ b/src/applications/calendar/xaction/PhabricatorCalendarEventUntilDateTransaction.php
@@ -18,9 +18,6 @@
$actor = $this->getActor();
$editor = $this->getEditor();
- // TODO: DEPRECATED.
- $object->setRecurrenceEndDate($value);
-
$datetime = PhutilCalendarAbsoluteDateTime::newFromDictionary($value);
$datetime->setIsAllDay($editor->getNewIsAllDay());
diff --git a/webroot/rsrc/js/application/calendar/behavior-recurring-edit.js b/webroot/rsrc/js/application/calendar/behavior-recurring-edit.js
deleted file mode 100644
--- a/webroot/rsrc/js/application/calendar/behavior-recurring-edit.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * @provides javelin-behavior-recurring-edit
- */
-
-
-JX.behavior('recurring-edit', function(config) {
- var checkbox = JX.$(config.isRecurring);
- var frequency = JX.$(config.frequency);
- var end_date = JX.$(config.recurrenceEndDate);
-
- var end_date_checkbox = JX.DOM.find(end_date, 'input', 'calendar-enable');
-
- JX.DOM.listen(checkbox, 'change', null, function() {
- if (checkbox.checked) {
- enableRecurring();
- } else {
- disableRecurring();
- }
- });
-
- JX.DOM.listen(end_date, 'change', null, function() {
- if (end_date_checkbox.checked) {
- enableRecurring();
- }
- });
-
- function enableRecurring() {
- checkbox.checked = true;
- frequency.disabled = false;
- end_date.disabled = false;
- }
-
- function disableRecurring() {
- checkbox.checked = false;
- frequency.disabled = true;
- end_date.disabled = true;
- end_date_checkbox.checked = false;
-
- JX.DOM.alterClass(end_date, 'datepicker-disabled', true);
- }
-});

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 12, 5:38 AM (5 d, 17 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6746666
Default Alt Text
D16789.diff (6 KB)

Event Timeline