Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F548762
DiffusionCommitWrongBuildsHeraldField.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
DiffusionCommitWrongBuildsHeraldField.php
View Options
<?php
final
class
DiffusionCommitWrongBuildsHeraldField
extends
DiffusionCommitHeraldField
{
const
FIELDCONST
=
'diffusion.commit.builds.wrong'
;
public
function
getHeraldFieldName
()
{
return
pht
(
'Revision has build warning'
);
}
public
function
getFieldGroupKey
()
{
return
HeraldRelatedFieldGroup
::
FIELDGROUPKEY
;
}
public
function
getHeraldFieldValue
(
$object
)
{
$adapter
=
$this
->
getAdapter
();
$viewer
=
$adapter
->
getViewer
();
$revision
=
$adapter
->
loadDifferentialRevision
();
if
(!
$revision
)
{
return
false
;
}
if
(
$revision
->
isPublished
())
{
$wrong_builds
=
DifferentialRevision
::
PROPERTY_WRONG_BUILDS
;
return
!
$revision
->
getProperty
(
$wrong_builds
,
false
);
}
// Reload the revision to pick up active diffs.
$revision
=
id
(
new
DifferentialRevisionQuery
())
->
setViewer
(
$viewer
)
->
withPHIDs
(
array
(
$revision
->
getPHID
()))
->
needActiveDiffs
(
true
)
->
executeOne
();
$concerning
=
DifferentialDiffExtractionEngine
::
loadConcerningBuilds
(
$viewer
,
$revision
,
$strict
=
false
);
return
(
bool
)
$concerning
;
}
protected
function
getHeraldFieldStandardType
()
{
return
self
::
STANDARD_BOOL
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 1:54 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
121957
Default Alt Text
DiffusionCommitWrongBuildsHeraldField.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment