From 51b5bf1e673a6319efbfc8ae515076e29233ede9 Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 25 Jul 2014 06:23:44 -0700 Subject: [PATCH] Fix unmigrated load() call in Audit inlines Summary: Fixes T5711. I missed this somehow in grepping. :/ Test Plan: Edited and deleted an inline draft. Reviewers: chad, btrahan, joshuaspence Reviewed By: joshuaspence Subscribers: epriestley Maniphest Tasks: T5711 Differential Revision: https://secure.phabricator.com/D10051 --- .../audit/storage/PhabricatorAuditInlineComment.php | 11 +++++++++++ .../controller/DiffusionInlineCommentController.php | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/applications/audit/storage/PhabricatorAuditInlineComment.php b/src/applications/audit/storage/PhabricatorAuditInlineComment.php index e39d20cd54..c2ad21503e 100644 --- a/src/applications/audit/storage/PhabricatorAuditInlineComment.php +++ b/src/applications/audit/storage/PhabricatorAuditInlineComment.php @@ -28,6 +28,17 @@ final class PhabricatorAuditInlineComment return $this->proxy; } + public static function loadID($id) { + $inlines = id(new PhabricatorAuditTransactionComment())->loadAllWhere( + 'id = %d', + $id); + if (!$inlines) { + return null; + } + + return head(self::buildProxies($inlines)); + } + public static function loadDraftComments( PhabricatorUser $viewer, $commit_phid) { diff --git a/src/applications/diffusion/controller/DiffusionInlineCommentController.php b/src/applications/diffusion/controller/DiffusionInlineCommentController.php index c0e816951a..c7d45c903d 100644 --- a/src/applications/diffusion/controller/DiffusionInlineCommentController.php +++ b/src/applications/diffusion/controller/DiffusionInlineCommentController.php @@ -40,7 +40,7 @@ final class DiffusionInlineCommentController } protected function loadComment($id) { - return id(new PhabricatorAuditInlineComment())->load($id); + return PhabricatorAuditInlineComment::loadID($id); } protected function loadCommentForEdit($id) {