Page MenuHomePhorge

PhamePostHistoryController.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

PhamePostHistoryController.php

<?php
final class PhamePostHistoryController extends PhamePostController {
public function shouldAllowPublic() {
return true;
}
public function handleRequest(AphrontRequest $request) {
$viewer = $request->getViewer();
$post = id(new PhamePostQuery())
->setViewer($viewer)
->withIDs(array($request->getURIData('id')))
->executeOne();
if (!$post) {
return new Aphront404Response();
}
$blog = $post->getBlog();
$crumbs = $this->buildApplicationCrumbs();
if ($blog) {
$crumbs->addTextCrumb(
$blog->getName(),
$this->getApplicationURI('blog/view/'.$blog->getID().'/'));
} else {
$crumbs->addTextCrumb(
pht('[No Blog]'),
null);
}
$crumbs->addTextCrumb(
$post->getTitle(),
$this->getApplicationURI('post/view/'.$post->getID().'/'));
$crumbs->addTextCrumb(pht('Post History'));
$crumbs->setBorder(true);
$timeline = $this->buildTransactionTimeline(
$post,
new PhamePostTransactionQuery());
$timeline->setShouldTerminate(true);
return $this->newPage()
->setTitle($post->getTitle())
->setPageObjectPHIDs(array($post->getPHID()))
->setCrumbs($crumbs)
->appendChild(
array(
$timeline,
));
}
}

File Metadata

Mime Type
text/x-php
Expires
Wed, Jul 2, 8:34 AM (1 d, 23 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
291871
Default Alt Text
PhamePostHistoryController.php (1 KB)

Event Timeline