2012-07-23 20:01:28 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class DiffusionInlineCommentPreviewController
|
|
|
|
extends PhabricatorInlineCommentPreviewController {
|
|
|
|
|
2015-03-28 01:08:31 +01:00
|
|
|
protected function loadInlineComments() {
|
|
|
|
$viewer = $this->getViewer();
|
2012-07-23 20:01:28 +02:00
|
|
|
|
2015-03-28 01:08:31 +01:00
|
|
|
return PhabricatorAuditInlineComment::loadDraftComments(
|
|
|
|
$viewer,
|
|
|
|
$this->getCommitPHID());
|
2012-07-23 20:01:28 +02:00
|
|
|
}
|
|
|
|
|
2015-03-28 01:08:31 +01:00
|
|
|
protected function loadObjectOwnerPHID() {
|
|
|
|
$viewer = $this->getViewer();
|
2012-07-23 20:01:28 +02:00
|
|
|
|
2015-03-28 01:08:31 +01:00
|
|
|
$commit = id(new DiffusionCommitQuery())
|
|
|
|
->setViewer($viewer)
|
|
|
|
->withPHIDs(array($this->getCommitPHID()))
|
|
|
|
->executeOne();
|
|
|
|
if (!$commit) {
|
|
|
|
return null;
|
|
|
|
}
|
2012-07-23 20:01:28 +02:00
|
|
|
|
2015-03-28 01:08:31 +01:00
|
|
|
return $commit->getAuthorPHID();
|
2012-07-23 20:01:28 +02:00
|
|
|
}
|
2015-03-28 01:08:31 +01:00
|
|
|
|
|
|
|
private function getCommitPHID() {
|
|
|
|
return $this->getRequest()->getURIData('phid');
|
|
|
|
}
|
|
|
|
|
2012-07-23 20:01:28 +02:00
|
|
|
}
|