Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93590272
DifferentialTransactionQuery.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Nov 29, 23:55
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Dec 1, 23:55 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22668849
Attached To
rPH Phabricator
DifferentialTransactionQuery.php
View Options
<?php
final
class
DifferentialTransactionQuery
extends
PhabricatorApplicationTransactionQuery
{
public
function
getTemplateApplicationTransaction
()
{
return
new
DifferentialTransaction
();
}
public
static
function
loadUnsubmittedInlineComments
(
PhabricatorUser
$viewer
,
DifferentialRevision
$revision
)
{
// TODO: This probably needs to move somewhere more central as we move
// away from DifferentialInlineCommentQuery, but
// PhabricatorApplicationTransactionCommentQuery is currently `final` and
// I'm not yet decided on how to approach that. For now, just get the PHIDs
// and then execute a PHID-based query through the standard stack.
$table
=
new
DifferentialTransactionComment
();
$conn_r
=
$table
->
establishConnection
(
'r'
);
$phids
=
queryfx_all
(
$conn_r
,
'SELECT phid FROM %T
WHERE revisionPHID = %s
AND authorPHID = %s
AND transactionPHID IS NULL
AND isDeleted = 0'
,
$table
->
getTableName
(),
$revision
->
getPHID
(),
$viewer
->
getPHID
());
$phids
=
ipull
(
$phids
,
'phid'
);
if
(!
$phids
)
{
return
array
();
}
$comments
=
id
(
new
PhabricatorApplicationTransactionCommentQuery
())
->
setTemplate
(
new
DifferentialTransactionComment
())
->
setViewer
(
$viewer
)
->
withPHIDs
(
$phids
)
->
execute
();
$comments
=
PhabricatorInlineCommentController
::
loadAndAttachReplies
(
$viewer
,
$comments
);
return
$comments
;
}
}
Event Timeline
Log In to Comment