@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Don't include other users' unpublished drafts when counting Pholio inlines

Summary: Fixes T10886. This should get more formal some day, but just fix it for now.

Test Plan: Reloaded mock with other unpublished draft inlines, saw accurate count.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10886

Differential Revision: https://secure.phabricator.com/D16087

+6 -3
+6 -3
src/applications/pholio/query/PholioImageQuery.php
··· 137 137 $all_files = mpull($all_files, null, 'getPHID'); 138 138 139 139 if ($this->needInlineComments) { 140 - $all_inline_comments = id(new PholioTransactionComment()) 141 - ->loadAllWhere('imageid IN (%Ld)', 142 - mpull($images, 'getID')); 140 + // Only load inline comments the viewer has permission to see. 141 + $all_inline_comments = id(new PholioTransactionComment())->loadAllWhere( 142 + 'imageID IN (%Ld) 143 + AND (transactionPHID IS NOT NULL OR authorPHID = %s)', 144 + mpull($images, 'getID'), 145 + $this->getViewer()->getPHID()); 143 146 $all_inline_comments = mgroup($all_inline_comments, 'getImageID'); 144 147 } 145 148