mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-24 05:28:18 +01:00
03a02530cb
Summary: Fixes T6427. Test Plan: Log out of sandbox, navigate to public task, click 'See Details' in a transaction. Get Dialog. Reviewers: btrahan, epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T6427 Differential Revision: https://secure.phabricator.com/D10759
42 lines
1 KiB
PHP
42 lines
1 KiB
PHP
<?php
|
|
|
|
final class PhabricatorApplicationTransactionDetailController
|
|
extends PhabricatorApplicationTransactionController {
|
|
|
|
private $phid;
|
|
|
|
public function shouldAllowPublic() {
|
|
return true;
|
|
}
|
|
|
|
public function willProcessRequest(array $data) {
|
|
$this->phid = $data['phid'];
|
|
}
|
|
|
|
public function processRequest() {
|
|
$request = $this->getRequest();
|
|
$viewer = $request->getUser();
|
|
|
|
$xaction = id(new PhabricatorObjectQuery())
|
|
->withPHIDs(array($this->phid))
|
|
->setViewer($viewer)
|
|
->executeOne();
|
|
if (!$xaction) {
|
|
return new Aphront404Response();
|
|
}
|
|
|
|
$details = $xaction->renderChangeDetails($viewer);
|
|
|
|
$cancel_uri = $this->guessCancelURI($viewer, $xaction);
|
|
$dialog = id(new AphrontDialogView())
|
|
->setUser($viewer)
|
|
->setTitle(pht('Change Details'))
|
|
->setWidth(AphrontDialogView::WIDTH_FULL)
|
|
->setFlush(true)
|
|
->appendChild($details)
|
|
->addCancelButton($cancel_uri);
|
|
|
|
return id(new AphrontDialogResponse())->setDialog($dialog);
|
|
}
|
|
|
|
}
|