Page MenuHomestyx hydra

PholioInlineDeleteController.php
No OneTemporary

PholioInlineDeleteController.php

<?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));
}
}
}

File Metadata

Mime Type
text/x-php
Expires
Sun, Nov 30, 9:27 PM (10 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
429817
Default Alt Text
PholioInlineDeleteController.php (717 B)

Event Timeline