@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.

People calendar month view should pass AphrontFormDateControlValue for start range and end range to MonthView

Summary: Fixes T8181, People calendar month view should pass AphrontFormDateControlValue for start range and end range to MonthView

Test Plan: Open install/p/epriestley/calendar without error

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T8181

Differential Revision: https://secure.phabricator.com/D12827

+24 -5
+24 -5
src/applications/people/controller/PhabricatorPeopleCalendarController.php
··· 41 41 "{$year}-{$month}-01", 42 42 "{$year}-{$month}-31"); 43 43 44 + $start_epoch = strtotime("{$year}-{$month}-01"); 45 + $end_epoch = strtotime("{$year}-{$month}-01 next month"); 46 + 44 47 $statuses = id(new PhabricatorCalendarEventQuery()) 45 48 ->setViewer($user) 46 49 ->withInvitedPHIDs(array($user->getPHID())) 47 50 ->withDateRange( 48 - strtotime("{$year}-{$month}-01"), 49 - strtotime("{$year}-{$month}-01 next month")) 51 + $start_epoch, 52 + $end_epoch) 50 53 ->execute(); 51 54 55 + $start_range_value = AphrontFormDateControlValue::newFromEpoch( 56 + $user, 57 + $start_epoch); 58 + $end_range_value = AphrontFormDateControlValue::newFromEpoch( 59 + $user, 60 + $end_epoch); 61 + 52 62 if ($month == $month_d && $year == $year_d) { 53 - $month_view = new PHUICalendarMonthView($month, $year, $day); 63 + $month_view = new PHUICalendarMonthView( 64 + $start_range_value, 65 + $end_range_value, 66 + $month, 67 + $year, 68 + $day); 54 69 } else { 55 - $month_view = new PHUICalendarMonthView($month, $year); 70 + $month_view = new PHUICalendarMonthView( 71 + $start_range_value, 72 + $end_range_value, 73 + $month, 74 + $year); 56 75 } 57 76 58 77 $month_view->setBrowseURI($request->getRequestURI()); ··· 67 86 $event = new AphrontCalendarEventView(); 68 87 $event->setEpochRange($status->getDateFrom(), $status->getDateTo()); 69 88 $event->setUserPHID($status->getUserPHID()); 70 - $event->setName($status->getHumanStatus()); 89 + $event->setName($status->getName()); 71 90 $event->setDescription($status->getDescription()); 72 91 $event->setEventID($status->getID()); 73 92 $month_view->addEvent($event);