Summary: Ref T4896. Move all direct accesses to the inline comment table behind a small amount of API to make it easier to migrate the table. Test Plan: - Grepped for `PhabricatorAuditInlineComment`. - Grepped for `audit_inlinecomment`. - Created a draft comment. - Previewed a draft comment. - Reloaded page, still saw draft. - Viewed standalone, still saw draft. - Made comment, inline published. - Added a draft, saw both. - Edited inline comment. - Reindexed commit. - Searched for unique word in published comment, found commit. - Searched for unique word in draft comment, no results. Reviewers: btrahan, joshuaspence Reviewed By: joshuaspence Subscribers: epriestley Maniphest Tasks: T4896 Differential Revision: https://secure.phabricator.com/D10016
22 lines
455 B
PHP
22 lines
455 B
PHP
<?php
|
|
|
|
final class DiffusionInlineCommentPreviewController
|
|
extends PhabricatorInlineCommentPreviewController {
|
|
|
|
private $commitPHID;
|
|
|
|
public function willProcessRequest(array $data) {
|
|
$this->commitPHID = $data['phid'];
|
|
}
|
|
|
|
protected function loadInlineComments() {
|
|
$user = $this->getRequest()->getUser();
|
|
|
|
$inlines = PhabricatorAuditInlineComment::loadDraftComments(
|
|
$user,
|
|
$this->commitPHID);
|
|
|
|
return $inlines;
|
|
}
|
|
}
|