Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F108169577
PholioInlineController.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
Mon, Apr 14, 22:37
Size
964 B
Mime Type
text/x-php
Expires
Wed, Apr 16, 22:37 (2 d)
Engine
blob
Format
Raw Data
Handle
25524272
Attached To
rPH Phabricator
PholioInlineController.php
View Options
<?php
/**
* @group pholio
*/
final
class
PholioInlineController
extends
PholioController
{
private
$id
;
public
function
willProcessRequest
(
array
$data
)
{
$this
->
id
=
$data
[
'id'
];
}
public
function
processRequest
()
{
$request
=
$this
->
getRequest
();
$user
=
$request
->
getUser
();
$inline_comments
=
id
(
new
PholioTransactionComment
())->
loadAllWhere
(
'imageid = %d AND transactionphid IS NOT NULL'
,
$this
->
id
);
$inlines
=
array
();
foreach
(
$inline_comments
as
$inline_comment
)
{
$inlines
[]
=
array
(
'phid'
=>
$inline_comment
->
getPHID
(),
'imageID'
=>
$inline_comment
->
getImageID
(),
'x'
=>
$inline_comment
->
getX
(),
'y'
=>
$inline_comment
->
getY
(),
'width'
=>
$inline_comment
->
getWidth
(),
'height'
=>
$inline_comment
->
getHeight
(),
'content'
=>
$inline_comment
->
getContent
());
}
return
id
(
new
AphrontAjaxResponse
())->
setContent
(
$inlines
);
}
}
Event Timeline
Log In to Comment