Changeset View
Changeset View
Standalone View
Standalone View
src/applications/audit/storage/PhabricatorAuditInlineComment.php
| Show First 20 Lines • Show All 105 Lines • ▼ Show 20 Lines | if ($path_id === null) { | ||||
| $inlines = id(new PhabricatorAuditTransactionComment())->loadAllWhere( | $inlines = id(new PhabricatorAuditTransactionComment())->loadAllWhere( | ||||
| 'commitPHID = %s AND pathID = %d AND | 'commitPHID = %s AND pathID = %d AND | ||||
| ((authorPHID = %s AND isDeleted = 0) OR transactionPHID IS NOT NULL)', | ((authorPHID = %s AND isDeleted = 0) OR transactionPHID IS NOT NULL)', | ||||
| $commit_phid, | $commit_phid, | ||||
| $path_id, | $path_id, | ||||
| $viewer->getPHID()); | $viewer->getPHID()); | ||||
| } | } | ||||
| foreach ($inlines as $key => $inline) { | |||||
| $is_draft = !$inline->getTransactionPHID(); | |||||
| if ($is_draft && $inline->isEmptyInlineComment()) { | |||||
| unset($inlines[$key]); | |||||
| } | |||||
| } | |||||
| return self::buildProxies($inlines); | return self::buildProxies($inlines); | ||||
| } | } | ||||
| private static function buildProxies(array $inlines) { | private static function buildProxies(array $inlines) { | ||||
| $results = array(); | $results = array(); | ||||
| foreach ($inlines as $key => $inline) { | foreach ($inlines as $key => $inline) { | ||||
| $results[$key] = self::newFromModernComment( | $results[$key] = self::newFromModernComment( | ||||
| $inline); | $inline); | ||||
| Show All 40 Lines | |||||