mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-08 21:08:29 +01:00
Summary: Ref T9234, these should allow being publicly visible Test Plan: log out, see page Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Maniphest Tasks: T9234 Differential Revision: https://secure.phabricator.com/D13952
46 lines
1.1 KiB
PHP
46 lines
1.1 KiB
PHP
<?php
|
|
|
|
final class PonderAnswerHistoryController extends PonderController {
|
|
|
|
public function shouldAllowPublic() {
|
|
return true;
|
|
}
|
|
|
|
public function handleRequest(AphrontRequest $request) {
|
|
$viewer = $request->getViewer();
|
|
$id = $request->getURIData('id');
|
|
|
|
$answer = id(new PonderAnswerQuery())
|
|
->setViewer($viewer)
|
|
->withIDs(array($id))
|
|
->executeOne();
|
|
if (!$answer) {
|
|
return new Aphront404Response();
|
|
}
|
|
|
|
|
|
$timeline = $this->buildTransactionTimeline(
|
|
$answer,
|
|
new PonderAnswerTransactionQuery());
|
|
$timeline->setShouldTerminate(true);
|
|
|
|
$qid = $answer->getQuestion()->getID();
|
|
$aid = $answer->getID();
|
|
|
|
$crumbs = $this->buildApplicationCrumbs();
|
|
$crumbs->setBorder(true);
|
|
$crumbs->addTextCrumb("Q{$qid}", "/Q{$qid}");
|
|
$crumbs->addTextCrumb("A{$aid}", "/Q{$qid}#{$aid}");
|
|
$crumbs->addTextCrumb(pht('History'));
|
|
|
|
return $this->buildApplicationPage(
|
|
array(
|
|
$crumbs,
|
|
$timeline,
|
|
),
|
|
array(
|
|
'title' => pht('Answer History'),
|
|
));
|
|
}
|
|
|
|
}
|