mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-11 08:06:13 +01:00
ecc3314a25
Summary: Ref T9979. This is currently hard-coded but can be done in a generic way. This has one minor behavioral changes: answer text is no longer included in the question text index in Ponder. I'm not planning to accommodate that for now since I don't want to dig this hole any deeper than I already have. This behavior should be different anyway (e.g., index the answer, then show the question in the results or something). Test Plan: - Put a unique word in a Maniphest comment. - Searched for the word. - Found the task. Reviewers: chad Reviewed By: chad Maniphest Tasks: T9979 Differential Revision: https://secure.phabricator.com/D14837
42 lines
1.1 KiB
PHP
42 lines
1.1 KiB
PHP
<?php
|
|
|
|
final class PhabricatorApplicationTransactionShowOlderController
|
|
extends PhabricatorApplicationTransactionController {
|
|
|
|
public function shouldAllowPublic() {
|
|
return true;
|
|
}
|
|
|
|
public function handleRequest(AphrontRequest $request) {
|
|
$viewer = $this->getViewer();
|
|
|
|
$object = id(new PhabricatorObjectQuery())
|
|
->withPHIDs(array($request->getURIData('phid')))
|
|
->setViewer($viewer)
|
|
->executeOne();
|
|
if (!$object) {
|
|
return new Aphront404Response();
|
|
}
|
|
|
|
if (!$object instanceof PhabricatorApplicationTransactionInterface) {
|
|
return new Aphront404Response();
|
|
}
|
|
|
|
$query = PhabricatorApplicationTransactionQuery::newQueryForObject($object);
|
|
if (!$query) {
|
|
return new Aphront404Response();
|
|
}
|
|
|
|
$timeline = $this->buildTransactionTimeline($object, $query);
|
|
|
|
$phui_timeline = $timeline->buildPHUITimelineView($with_hiding = false);
|
|
$phui_timeline->setShouldAddSpacers(false);
|
|
$events = $phui_timeline->buildEvents();
|
|
|
|
return id(new AphrontAjaxResponse())
|
|
->setContent(array(
|
|
'timeline' => hsprintf('%s', $events),
|
|
));
|
|
}
|
|
|
|
}
|