Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93638762
PonderQuestionHistoryController.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Nov 30, 08:43
Size
985 B
Mime Type
text/x-php
Expires
Mon, Dec 2, 08:43 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
22678944
Attached To
rPH Phabricator
PonderQuestionHistoryController.php
View Options
<?php
final
class
PonderQuestionHistoryController
extends
PonderController
{
private
$id
;
public
function
willProcessRequest
(
array
$data
)
{
$this
->
id
=
$data
[
'id'
];
}
public
function
processRequest
()
{
$request
=
$this
->
getRequest
();
$viewer
=
$request
->
getUser
();
$question
=
id
(
new
PonderQuestionQuery
())
->
setViewer
(
$viewer
)
->
withIDs
(
array
(
$this
->
id
))
->
executeOne
();
if
(!
$question
)
{
return
new
Aphront404Response
();
}
$timeline
=
$this
->
buildTransactionTimeline
(
$question
,
new
PonderQuestionTransactionQuery
());
$timeline
->
setShouldTerminate
(
true
);
$qid
=
$question
->
getID
();
$crumbs
=
$this
->
buildApplicationCrumbs
();
$crumbs
->
addTextCrumb
(
"Q{$qid}"
,
"/Q{$qid}"
);
$crumbs
->
addTextCrumb
(
pht
(
'History'
));
return
$this
->
buildApplicationPage
(
array
(
$crumbs
,
$timeline
,
),
array
(
'title'
=>
pht
(
'Question History'
),
));
}
}
Event Timeline
Log In to Comment