[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PhabricatorFlagDeleteController extends PhabricatorFlagController { 4 5 private $id; 6 7 public function willProcessRequest(array $data) { 8 $this->id = $data['id']; 9 } 10 11 public function processRequest() { 12 $request = $this->getRequest(); 13 $user = $request->getUser(); 14 15 $flag = id(new PhabricatorFlag())->load($this->id); 16 if (!$flag) { 17 return new Aphront404Response(); 18 } 19 20 if ($flag->getOwnerPHID() != $user->getPHID()) { 21 return new Aphront400Response(); 22 } 23 24 $flag->delete(); 25 26 return id(new AphrontReloadResponse())->setURI('/flag/'); 27 } 28 29 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |