Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101308628
PholioInlineDeleteController.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
Fri, Feb 7, 16:02
Size
717 B
Mime Type
text/x-php
Expires
Sun, Feb 9, 16:02 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
24131909
Attached To
rPH Phabricator
PholioInlineDeleteController.php
View Options
<?php
/**
* @group pholio
*/
final
class
PholioInlineDeleteController
extends
PholioController
{
private
$id
;
public
function
willProcessRequest
(
array
$data
)
{
$this
->
id
=
$data
[
'id'
];
}
public
function
processRequest
()
{
$request
=
$this
->
getRequest
();
$user
=
$request
->
getUser
();
$inline_comment
=
id
(
new
PholioTransactionComment
())->
loadOneWhere
(
'id = %d AND authorphid = %s AND transactionphid IS NULL'
,
$this
->
id
,
$user
->
getPHID
());
if
(
$inline_comment
==
null
)
{
return
new
Aphront404Response
();
}
else
{
$inline_comment
->
delete
();
return
id
(
new
AphrontAjaxResponse
())
->
setContent
(
array
(
'success'
=>
true
));
}
}
}
Event Timeline
Log In to Comment