Page MenuHomePhorge

No OneTemporary

diff --git a/src/applications/differential/xaction/DifferentialRevisionInlineTransaction.php b/src/applications/differential/xaction/DifferentialRevisionInlineTransaction.php
index 9e566047ec..35d5034033 100644
--- a/src/applications/differential/xaction/DifferentialRevisionInlineTransaction.php
+++ b/src/applications/differential/xaction/DifferentialRevisionInlineTransaction.php
@@ -1,53 +1,53 @@
<?php
final class DifferentialRevisionInlineTransaction
extends PhabricatorModularTransactionType {
// NOTE: This class is NOT an actual Differential modular transaction type!
// It does not extend "DifferentialRevisionTransactionType". Some day it
// should, but for now it's just reducing the amount of hackiness around
// supporting inline comments in the "transaction.search" Conduit API method.
const TRANSACTIONTYPE = 'internal.pretend-inline';
public function getTransactionTypeForConduit($xaction) {
return 'inline';
}
public function loadTransactionTypeConduitData(array $xactions) {
$viewer = $this->getViewer();
$changeset_ids = array();
foreach ($xactions as $xaction) {
$changeset_ids[] = $xaction->getComment()->getChangesetID();
}
$changesets = id(new DifferentialChangesetQuery())
->setViewer($viewer)
->withIDs($changeset_ids)
->execute();
$changesets = mpull($changesets, null, 'getID');
return $changesets;
}
public function getFieldValuesForConduit($object, $data) {
$comment = $object->getComment();
$changeset = $data[$comment->getChangesetID()];
$diff = $changeset->getDiff();
return array(
'diff' => array(
- 'id' => $diff->getID(),
+ 'id' => (int)$diff->getID(),
'phid' => $diff->getPHID(),
),
'path' => $changeset->getDisplayFilename(),
'line' => (int)$comment->getLineNumber(),
'length' => (int)($comment->getLineLength() + 1),
'replyToCommentPHID' => $comment->getReplyToCommentPHID(),
);
}
}

File Metadata

Mime Type
text/x-diff
Expires
Sun, Jan 19, 18:29 (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1127436
Default Alt Text
(1 KB)

Event Timeline