mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-15 03:12:41 +01:00
a17542ab28
Summary: Ref T1460. Overall: - Pass `objectOwnerPHID` consistently. - Pass viewer consistently. - Set the correct draft state for checkboxes on the client. Test Plan: - Made inline comments in Differential. - Made inline comments in Diffusion. Reviewers: chad Reviewed By: chad Subscribers: epriestley Maniphest Tasks: T1460 Differential Revision: https://secure.phabricator.com/D12186
32 lines
712 B
PHP
32 lines
712 B
PHP
<?php
|
|
|
|
final class DiffusionInlineCommentPreviewController
|
|
extends PhabricatorInlineCommentPreviewController {
|
|
|
|
protected function loadInlineComments() {
|
|
$viewer = $this->getViewer();
|
|
|
|
return PhabricatorAuditInlineComment::loadDraftComments(
|
|
$viewer,
|
|
$this->getCommitPHID());
|
|
}
|
|
|
|
protected function loadObjectOwnerPHID() {
|
|
$viewer = $this->getViewer();
|
|
|
|
$commit = id(new DiffusionCommitQuery())
|
|
->setViewer($viewer)
|
|
->withPHIDs(array($this->getCommitPHID()))
|
|
->executeOne();
|
|
if (!$commit) {
|
|
return null;
|
|
}
|
|
|
|
return $commit->getAuthorPHID();
|
|
}
|
|
|
|
private function getCommitPHID() {
|
|
return $this->getRequest()->getURIData('phid');
|
|
}
|
|
|
|
}
|