@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+9 -14
+2 -2
src/applications/calendar/controller/PhabricatorCalendarEventViewController.php
··· 101 101 $viewer = $this->getViewer(); 102 102 $id = $event->getID(); 103 103 104 - if ($event->isCancelledEvent()) { 104 + if ($event->getIsCancelled()) { 105 105 $icon = 'fa-ban'; 106 106 $color = 'red'; 107 107 $status = pht('Cancelled'); ··· 209 209 $cancel_label = pht('Cancel Event'); 210 210 $reinstate_label = pht('Reinstate Event'); 211 211 212 - if ($event->isCancelledEvent()) { 212 + if ($event->getIsCancelled()) { 213 213 $curtain->addAction( 214 214 id(new PhabricatorActionView()) 215 215 ->setName($reinstate_label)
+1 -1
src/applications/calendar/phid/PhabricatorCalendarEventPHIDType.php
··· 41 41 ->setFullName(pht('%s: %s', $monogram, $name)) 42 42 ->setURI($uri); 43 43 44 - if ($event->isCancelledEvent()) { 44 + if ($event->getIsCancelled()) { 45 45 $handle->setStatus(PhabricatorObjectHandle::STATUS_CLOSED); 46 46 } 47 47 }
+3 -3
src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php
··· 303 303 304 304 $item->addAttribute($event->renderEventDate($viewer, false)); 305 305 306 - if ($event->isCancelledEvent()) { 306 + if ($event->getIsCancelled()) { 307 307 $item->setDisabled(true); 308 308 } 309 309 ··· 368 368 $event_view = id(new AphrontCalendarEventView()) 369 369 ->setHostPHID($event->getHostPHID()) 370 370 ->setEpochRange($epoch_min, $epoch_max) 371 - ->setIsCancelled($event->isCancelledEvent()) 371 + ->setIsCancelled($event->getIsCancelled()) 372 372 ->setName($event->getName()) 373 373 ->setURI($event->getURI()) 374 374 ->setIsAllDay($event->getIsAllDay()) ··· 441 441 ->setIconColor($status_color) 442 442 ->setName($event->getName()) 443 443 ->setURI($event->getURI()) 444 - ->setIsCancelled($event->isCancelledEvent()); 444 + ->setIsCancelled($event->getIsCancelled()); 445 445 446 446 $day_view->addEvent($event_view); 447 447 }
+3 -8
src/applications/calendar/storage/PhabricatorCalendarEvent.php
··· 584 584 return ($this->instanceOfEventPHID !== null); 585 585 } 586 586 587 - public function isCancelledEvent() { 588 - // TODO: Remove this wrapper. 589 - return $this->getIsCancelled(); 590 - } 591 - 592 587 public function renderEventDate( 593 588 PhabricatorUser $viewer, 594 589 $show_end) { ··· 641 636 642 637 643 638 public function getDisplayIcon(PhabricatorUser $viewer) { 644 - if ($this->isCancelledEvent()) { 639 + if ($this->getIsCancelled()) { 645 640 return 'fa-times'; 646 641 } 647 642 ··· 665 660 } 666 661 667 662 public function getDisplayIconColor(PhabricatorUser $viewer) { 668 - if ($this->isCancelledEvent()) { 663 + if ($this->getIsCancelled()) { 669 664 return 'red'; 670 665 } 671 666 ··· 689 684 } 690 685 691 686 public function getDisplayIconLabel(PhabricatorUser $viewer) { 692 - if ($this->isCancelledEvent()) { 687 + if ($this->getIsCancelled()) { 693 688 return pht('Cancelled'); 694 689 } 695 690