Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101990237
PhabricatorFlagDeleteController.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, Feb 15, 22:32
Size
607 B
Mime Type
text/x-php
Expires
Mon, Feb 17, 22:32 (2 d)
Engine
blob
Format
Raw Data
Handle
24256818
Attached To
rPH Phabricator
PhabricatorFlagDeleteController.php
View Options
<?php
final
class
PhabricatorFlagDeleteController
extends
PhabricatorFlagController
{
private
$id
;
public
function
willProcessRequest
(
array
$data
)
{
$this
->
id
=
$data
[
'id'
];
}
public
function
processRequest
()
{
$request
=
$this
->
getRequest
();
$user
=
$request
->
getUser
();
$flag
=
id
(
new
PhabricatorFlag
())->
load
(
$this
->
id
);
if
(!
$flag
)
{
return
new
Aphront404Response
();
}
if
(
$flag
->
getOwnerPHID
()
!=
$user
->
getPHID
())
{
return
new
Aphront400Response
();
}
$flag
->
delete
();
return
id
(
new
AphrontReloadResponse
())->
setURI
(
'/flag/'
);
}
}
Event Timeline
Log In to Comment