Hide Audit comment table reads behind an API

Summary: Ref T4896. Buries all direct access to the table so we can limit the surface area affected by the migration.

Test Plan:
  - Grepped for `PhabricatorAuditComment`.
  - Grepped for `audit_comment`.
  - Viewed a bunch of comments.
  - Added a comment.
  - Reindexed a commit.
  - Searched for unique term in new comment.

Reviewers: btrahan, joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Maniphest Tasks: T4896

Differential Revision: https://secure.phabricator.com/D10019
This commit is contained in:
epriestley
2014-07-24 18:00:07 -07:00
parent c01aa794c1
commit dc5c87f74c
4 changed files with 15 additions and 6 deletions

View File

@@ -643,8 +643,8 @@ final class DiffusionCommitController extends DiffusionController {
private function buildComments(PhabricatorRepositoryCommit $commit) {
$user = $this->getRequest()->getUser();
$comments = id(new PhabricatorAuditComment())->loadAllWhere(
'targetPHID = %s ORDER BY dateCreated ASC',
$comments = PhabricatorAuditComment::loadComments(
$user,
$commit->getPHID());
$inlines = PhabricatorAuditInlineComment::loadPublishedComments(