Page MenuHomePhabricator

Hide direct accesses to Audit inline comment table behind API
ClosedPublic

Authored by epriestley on Jul 22 2014, 5:40 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 24, 9:52 PM
Unknown Object (File)
Sun, Apr 21, 3:44 PM
Unknown Object (File)
Fri, Apr 19, 2:03 AM
Unknown Object (File)
Fri, Apr 19, 2:03 AM
Unknown Object (File)
Fri, Apr 19, 2:03 AM
Unknown Object (File)
Fri, Apr 19, 2:03 AM
Unknown Object (File)
Wed, Apr 17, 2:36 PM
Unknown Object (File)
Tue, Apr 16, 4:07 PM
Subscribers

Details

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.

Diff Detail

Repository
rP Phabricator
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

epriestley retitled this revision from to Hide direct accesses to Audit inline comment table behind API.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added reviewers: joshuaspence, btrahan.

Some minor inlines.

src/applications/audit/storage/PhabricatorAuditInlineComment.php
21

Consider $author instead of $viewer?

31

Unused variable? I'm guessing you put this here to make the API consistent. I'm OK with that.

42

This seems a little odd that this method accepts a $path_id parameter whereas loadDraftComments and loadPublishedComments does not.

src/applications/diffusion/controller/DiffusionCommitController.php
328

I think this should be $commit->getPHID()

epriestley edited edge metadata.
  • Fix $commit instead of $commit->getPHID().
  • Forced Diffusion into the "selected changesets" mode to actually test this codepath.
  • API oddness is just for consistency, since it's temporary and having it work the same way reduces the chance of me screwing something up. The table access may swap to a Query that requires a real viewer later on.
This revision is now accepted and ready to land.Jul 25 2014, 12:55 AM
epriestley updated this revision to Diff 24152.

Closed by commit rP8605a1808d01 (authored by @epriestley).