Page MenuHomePhabricator

D12341.id29655.diff
No OneTemporary

D12341.id29655.diff

diff --git a/src/applications/calendar/controller/PhabricatorCalendarBrowseController.php b/src/applications/calendar/controller/PhabricatorCalendarBrowseController.php
--- a/src/applications/calendar/controller/PhabricatorCalendarBrowseController.php
+++ b/src/applications/calendar/controller/PhabricatorCalendarBrowseController.php
@@ -7,16 +7,15 @@
return true;
}
- public function processRequest() {
+ public function handleRequest(AphrontRequest $request) {
+ $viewer = $this->getViewer();
+
$now = time();
- $request = $this->getRequest();
- $user = $request->getUser();
- $year_d = phabricator_format_local_time($now, $user, 'Y');
+ $year_d = phabricator_format_local_time($now, $viewer, 'Y');
$year = $request->getInt('year', $year_d);
- $month_d = phabricator_format_local_time($now, $user, 'm');
+ $month_d = phabricator_format_local_time($now, $viewer, 'm');
$month = $request->getInt('month', $month_d);
- $day = phabricator_format_local_time($now, $user, 'j');
-
+ $day = phabricator_format_local_time($now, $viewer, 'j');
$holidays = id(new PhabricatorCalendarHoliday())->loadAllWhere(
'day BETWEEN %s AND %s',
@@ -24,7 +23,7 @@
"{$year}-{$month}-31");
$statuses = id(new PhabricatorCalendarEventQuery())
- ->setViewer($user)
+ ->setViewer($viewer)
->withDateRange(
strtotime("{$year}-{$month}-01"),
strtotime("{$year}-{$month}-01 next month"))
@@ -37,11 +36,11 @@
}
$month_view->setBrowseURI($request->getRequestURI());
- $month_view->setUser($user);
+ $month_view->setUser($viewer);
$month_view->setHolidays($holidays);
$phids = mpull($statuses, 'getUserPHID');
- $handles = $this->loadViewerHandles($phids);
+ $handles = $viewer->loadHandles($phids);
/* Assign Colors */
$unique = array_unique($phids);
diff --git a/src/applications/calendar/controller/PhabricatorCalendarViewController.php b/src/applications/calendar/controller/PhabricatorCalendarViewController.php
--- a/src/applications/calendar/controller/PhabricatorCalendarViewController.php
+++ b/src/applications/calendar/controller/PhabricatorCalendarViewController.php
@@ -7,16 +7,16 @@
return true;
}
- public function processRequest() {
- $user = $this->getRequest()->getUser();
+ public function handleRequest(AphrontRequest $request) {
+ $viewer = $this->getViewer();
$now = time();
$request = $this->getRequest();
- $year_d = phabricator_format_local_time($now, $user, 'Y');
+ $year_d = phabricator_format_local_time($now, $viewer, 'Y');
$year = $request->getInt('year', $year_d);
- $month_d = phabricator_format_local_time($now, $user, 'm');
+ $month_d = phabricator_format_local_time($now, $viewer, 'm');
$month = $request->getInt('month', $month_d);
- $day = phabricator_format_local_time($now, $user, 'j');
+ $day = phabricator_format_local_time($now, $viewer, 'j');
$holidays = id(new PhabricatorCalendarHoliday())->loadAllWhere(
@@ -25,8 +25,8 @@
"{$year}-{$month}-31");
$statuses = id(new PhabricatorCalendarEventQuery())
- ->setViewer($user)
- ->withInvitedPHIDs(array($user->getPHID()))
+ ->setViewer($viewer)
+ ->withInvitedPHIDs(array($viewer->getPHID()))
->withDateRange(
strtotime("{$year}-{$month}-01"),
strtotime("{$year}-{$month}-01 next month"))
@@ -39,7 +39,7 @@
}
$month_view->setBrowseURI($request->getRequestURI());
- $month_view->setUser($user);
+ $month_view->setUser($viewer);
$month_view->setHolidays($holidays);
if ($this->getNoticeView()) {
$month_view->setInfoView($this->getNoticeView());
diff --git a/src/applications/differential/controller/DifferentialChangesetViewController.php b/src/applications/differential/controller/DifferentialChangesetViewController.php
--- a/src/applications/differential/controller/DifferentialChangesetViewController.php
+++ b/src/applications/differential/controller/DifferentialChangesetViewController.php
@@ -6,8 +6,7 @@
return true;
}
- public function processRequest() {
- $request = $this->getRequest();
+ public function handleRequest(AphrontRequest $request) {
$viewer = $this->getViewer();
$author_phid = $viewer->getPHID();
diff --git a/src/applications/differential/controller/DifferentialDiffCreateController.php b/src/applications/differential/controller/DifferentialDiffCreateController.php
--- a/src/applications/differential/controller/DifferentialDiffCreateController.php
+++ b/src/applications/differential/controller/DifferentialDiffCreateController.php
@@ -135,13 +135,10 @@
->setUser($viewer);
if ($revision) {
- $revision_handles = $this->loadViewerHandles(array($revision->getPHID()));
- $revision_handle = head($revision_handles);
-
$form->appendChild(
id(new AphrontFormMarkupControl())
->setLabel(pht('Updating Revision'))
- ->setValue($revision_handle->renderLink()));
+ ->setValue($viewer->renderHandle($revision->getPHID())));
}
if ($repository_phid) {

File Metadata

Mime Type
text/plain
Expires
Mon, Jun 17, 12:00 PM (4 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6294230
Default Alt Text
D12341.id29655.diff (5 KB)

Event Timeline