Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13983942
D12763.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D12763.diff
View Options
diff --git a/resources/sql/autopatches/20150507.calendar.1.isallday.sql b/resources/sql/autopatches/20150507.calendar.1.isallday.sql
new file mode 100644
--- /dev/null
+++ b/resources/sql/autopatches/20150507.calendar.1.isallday.sql
@@ -0,0 +1,2 @@
+ALTER TABLE {$NAMESPACE}_calendar.calendar_event
+ ADD isAllDay BOOL NOT NULL;
diff --git a/src/applications/calendar/editor/PhabricatorCalendarEventEditor.php b/src/applications/calendar/editor/PhabricatorCalendarEventEditor.php
--- a/src/applications/calendar/editor/PhabricatorCalendarEventEditor.php
+++ b/src/applications/calendar/editor/PhabricatorCalendarEventEditor.php
@@ -21,6 +21,7 @@
$types[] = PhabricatorCalendarEventTransaction::TYPE_DESCRIPTION;
$types[] = PhabricatorCalendarEventTransaction::TYPE_CANCEL;
$types[] = PhabricatorCalendarEventTransaction::TYPE_INVITE;
+ $types[] = PhabricatorCalendarEventTransaction::TYPE_ALL_DAY;
$types[] = PhabricatorTransactions::TYPE_COMMENT;
$types[] = PhabricatorTransactions::TYPE_VIEW_POLICY;
@@ -49,6 +50,8 @@
return $object->getDescription();
case PhabricatorCalendarEventTransaction::TYPE_CANCEL:
return $object->getIsCancelled();
+ case PhabricatorCalendarEventTransaction::TYPE_ALL_DAY:
+ return $object->getIsAllDay();
case PhabricatorCalendarEventTransaction::TYPE_INVITE:
$map = $xaction->getNewValue();
$phids = array_keys($map);
@@ -86,6 +89,7 @@
case PhabricatorCalendarEventTransaction::TYPE_DESCRIPTION:
case PhabricatorCalendarEventTransaction::TYPE_CANCEL:
case PhabricatorCalendarEventTransaction::TYPE_INVITE:
+ case PhabricatorCalendarEventTransaction::TYPE_ALL_DAY:
return $xaction->getNewValue();
case PhabricatorCalendarEventTransaction::TYPE_STATUS:
return (int)$xaction->getNewValue();
@@ -120,6 +124,9 @@
case PhabricatorCalendarEventTransaction::TYPE_CANCEL:
$object->setIsCancelled((int)$xaction->getNewValue());
return;
+ case PhabricatorCalendarEventTransaction::TYPE_ALL_DAY:
+ $object->setIsAllDay((int)$xaction->getNewValue());
+ return;
case PhabricatorCalendarEventTransaction::TYPE_INVITE:
case PhabricatorTransactions::TYPE_COMMENT:
case PhabricatorTransactions::TYPE_VIEW_POLICY:
@@ -143,6 +150,7 @@
case PhabricatorCalendarEventTransaction::TYPE_STATUS:
case PhabricatorCalendarEventTransaction::TYPE_DESCRIPTION:
case PhabricatorCalendarEventTransaction::TYPE_CANCEL:
+ case PhabricatorCalendarEventTransaction::TYPE_ALL_DAY:
return;
case PhabricatorCalendarEventTransaction::TYPE_INVITE:
$map = $xaction->getNewValue();
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
@@ -17,6 +17,7 @@
protected $status;
protected $description;
protected $isCancelled;
+ protected $isAllDay;
protected $mailKey;
protected $viewPolicy;
@@ -84,6 +85,7 @@
'status' => 'uint32',
'description' => 'text',
'isCancelled' => 'bool',
+ 'isAllDay' => 'bool',
'mailKey' => 'bytes20',
),
self::CONFIG_KEY_SCHEMA => array(
diff --git a/src/applications/calendar/storage/PhabricatorCalendarEventTransaction.php b/src/applications/calendar/storage/PhabricatorCalendarEventTransaction.php
--- a/src/applications/calendar/storage/PhabricatorCalendarEventTransaction.php
+++ b/src/applications/calendar/storage/PhabricatorCalendarEventTransaction.php
@@ -9,6 +9,7 @@
const TYPE_STATUS = 'calendar.status';
const TYPE_DESCRIPTION = 'calendar.description';
const TYPE_CANCEL = 'calendar.cancel';
+ const TYPE_ALL_DAY = 'calendar.allday';
const TYPE_INVITE = 'calendar.invite';
const MAILTAG_RESCHEDULE = 'calendar-reschedule';
@@ -37,6 +38,7 @@
case self::TYPE_STATUS:
case self::TYPE_DESCRIPTION:
case self::TYPE_CANCEL:
+ case self::TYPE_ALL_DAY:
$phids[] = $this->getObjectPHID();
break;
case self::TYPE_INVITE:
@@ -58,6 +60,7 @@
case self::TYPE_STATUS:
case self::TYPE_DESCRIPTION:
case self::TYPE_CANCEL:
+ case self::TYPE_ALL_DAY:
case self::TYPE_INVITE:
return ($old === null);
}
@@ -71,6 +74,7 @@
case self::TYPE_END_DATE:
case self::TYPE_STATUS:
case self::TYPE_DESCRIPTION:
+ case self::TYPE_ALL_DAY:
case self::TYPE_CANCEL:
return 'fa-pencil';
break;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Oct 21, 9:52 AM (4 w, 4 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6713422
Default Alt Text
D12763.diff (4 KB)
Attached To
Mode
D12763: Just a sql patch for all day events.
Attached
Detach File
Event Timeline
Log In to Comment