Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98344923
PhabricatorApplicationTransactionShowOlderController.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
Sun, Jan 12, 07:39
Size
1 KB
Mime Type
text/x-php
Expires
Tue, Jan 14, 07:39 (2 d)
Engine
blob
Format
Raw Data
Handle
23565635
Attached To
rPH Phabricator
PhabricatorApplicationTransactionShowOlderController.php
View Options
<?php
final
class
PhabricatorApplicationTransactionShowOlderController
extends
PhabricatorApplicationTransactionController
{
public
function
shouldAllowPublic
()
{
return
true
;
}
public
function
handleRequest
(
AphrontRequest
$request
)
{
$request
=
$this
->
getRequest
();
$viewer
=
$request
->
getUser
();
$object
=
id
(
new
PhabricatorObjectQuery
())
->
withPHIDs
(
array
(
$request
->
getURIData
(
'phid'
)))
->
setViewer
(
$viewer
)
->
executeOne
();
if
(!
$object
)
{
return
new
Aphront404Response
();
}
if
(!
$object
instanceof
PhabricatorApplicationTransactionInterface
)
{
return
new
Aphront404Response
();
}
$template
=
$object
->
getApplicationTransactionTemplate
();
$queries
=
id
(
new
PhutilClassMapQuery
())
->
setAncestorClass
(
'PhabricatorApplicationTransactionQuery'
)
->
execute
();
$object_query
=
null
;
foreach
(
$queries
as
$query
)
{
if
(
$query
->
getTemplateApplicationTransaction
()
==
$template
)
{
$object_query
=
$query
;
break
;
}
}
if
(!
$object_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
),
));
}
}
Event Timeline
Log In to Comment