Differential D16896 Diff 40673 src/applications/files/controller/PhabricatorFileLightboxController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/files/controller/PhabricatorFileLightboxController.php
- This file was added.
<?php | |||||
final class PhabricatorFileLightboxController extends PhabricatorFileController { | |||||
Lint: Line Too Long: This line is 81 characters long, but the convention is 80 characters. | |||||
public function handleRequest(AphrontRequest $request) { | |||||
$viewer = $request->getViewer(); | |||||
$id = $request->getURIData('id'); | |||||
$file = id(new PhabricatorFileQuery()) | |||||
->setViewer($viewer) | |||||
->withIDs(array($id)) | |||||
->executeOne(); | |||||
if (!$file) { | |||||
return new Aphront404Response(); | |||||
} | |||||
$monogram = $file->getMonogram(); | |||||
$content = $this->buildTransactionTimeline( | |||||
$file, | |||||
id(new PhabricatorFileTransactionQuery()) | |||||
->withTransactionTypes(array(PhabricatorTransactions::TYPE_COMMENT))); | |||||
$content->setQuoteRef($monogram); | |||||
Not Done Inline ActionsWe probably need to implement some kind of $timeline->getIsEmpty() thing. epriestley: We probably need to implement some kind of $timeline->getIsEmpty() thing. | |||||
return id(new AphrontAjaxResponse()) | |||||
->setContent($content); | |||||
} | |||||
} |
This line is 81 characters long, but the convention is 80 characters.