mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-18 11:30:55 +01:00
Remove "isCancelledEvent()" wrapper on Calendar Events
Summary: Ref T11804. The field now reads the correct value directly and we don't need this wrapper. Test Plan: Poked around Calendar without explosions. Reviewers: chad Reviewed By: chad Maniphest Tasks: T11804 Differential Revision: https://secure.phabricator.com/D16779
This commit is contained in:
parent
91089acbe5
commit
f44a9a4e48
4 changed files with 9 additions and 14 deletions
|
@ -101,7 +101,7 @@ final class PhabricatorCalendarEventViewController
|
|||
$viewer = $this->getViewer();
|
||||
$id = $event->getID();
|
||||
|
||||
if ($event->isCancelledEvent()) {
|
||||
if ($event->getIsCancelled()) {
|
||||
$icon = 'fa-ban';
|
||||
$color = 'red';
|
||||
$status = pht('Cancelled');
|
||||
|
@ -209,7 +209,7 @@ final class PhabricatorCalendarEventViewController
|
|||
$cancel_label = pht('Cancel Event');
|
||||
$reinstate_label = pht('Reinstate Event');
|
||||
|
||||
if ($event->isCancelledEvent()) {
|
||||
if ($event->getIsCancelled()) {
|
||||
$curtain->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName($reinstate_label)
|
||||
|
|
|
@ -41,7 +41,7 @@ final class PhabricatorCalendarEventPHIDType extends PhabricatorPHIDType {
|
|||
->setFullName(pht('%s: %s', $monogram, $name))
|
||||
->setURI($uri);
|
||||
|
||||
if ($event->isCancelledEvent()) {
|
||||
if ($event->getIsCancelled()) {
|
||||
$handle->setStatus(PhabricatorObjectHandle::STATUS_CLOSED);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -303,7 +303,7 @@ final class PhabricatorCalendarEventSearchEngine
|
|||
|
||||
$item->addAttribute($event->renderEventDate($viewer, false));
|
||||
|
||||
if ($event->isCancelledEvent()) {
|
||||
if ($event->getIsCancelled()) {
|
||||
$item->setDisabled(true);
|
||||
}
|
||||
|
||||
|
@ -368,7 +368,7 @@ final class PhabricatorCalendarEventSearchEngine
|
|||
$event_view = id(new AphrontCalendarEventView())
|
||||
->setHostPHID($event->getHostPHID())
|
||||
->setEpochRange($epoch_min, $epoch_max)
|
||||
->setIsCancelled($event->isCancelledEvent())
|
||||
->setIsCancelled($event->getIsCancelled())
|
||||
->setName($event->getName())
|
||||
->setURI($event->getURI())
|
||||
->setIsAllDay($event->getIsAllDay())
|
||||
|
@ -441,7 +441,7 @@ final class PhabricatorCalendarEventSearchEngine
|
|||
->setIconColor($status_color)
|
||||
->setName($event->getName())
|
||||
->setURI($event->getURI())
|
||||
->setIsCancelled($event->isCancelledEvent());
|
||||
->setIsCancelled($event->getIsCancelled());
|
||||
|
||||
$day_view->addEvent($event_view);
|
||||
}
|
||||
|
|
|
@ -584,11 +584,6 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO
|
|||
return ($this->instanceOfEventPHID !== null);
|
||||
}
|
||||
|
||||
public function isCancelledEvent() {
|
||||
// TODO: Remove this wrapper.
|
||||
return $this->getIsCancelled();
|
||||
}
|
||||
|
||||
public function renderEventDate(
|
||||
PhabricatorUser $viewer,
|
||||
$show_end) {
|
||||
|
@ -641,7 +636,7 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO
|
|||
|
||||
|
||||
public function getDisplayIcon(PhabricatorUser $viewer) {
|
||||
if ($this->isCancelledEvent()) {
|
||||
if ($this->getIsCancelled()) {
|
||||
return 'fa-times';
|
||||
}
|
||||
|
||||
|
@ -665,7 +660,7 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO
|
|||
}
|
||||
|
||||
public function getDisplayIconColor(PhabricatorUser $viewer) {
|
||||
if ($this->isCancelledEvent()) {
|
||||
if ($this->getIsCancelled()) {
|
||||
return 'red';
|
||||
}
|
||||
|
||||
|
@ -689,7 +684,7 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO
|
|||
}
|
||||
|
||||
public function getDisplayIconLabel(PhabricatorUser $viewer) {
|
||||
if ($this->isCancelledEvent()) {
|
||||
if ($this->getIsCancelled()) {
|
||||
return pht('Cancelled');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue