Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F647785
DiffusionPreCommitContentWrongBuildsHeraldField.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
DiffusionPreCommitContentWrongBuildsHeraldField.php
View Options
<?php
final
class
DiffusionPreCommitContentWrongBuildsHeraldField
extends
DiffusionPreCommitContentHeraldField
{
const
FIELDCONST
=
'diffusion.pre.content.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
->
getRevision
();
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
=
true
);
return
(
bool
)
$concerning
;
}
protected
function
getHeraldFieldStandardType
()
{
return
self
::
STANDARD_BOOL
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, May 14, 7:00 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
131814
Default Alt Text
DiffusionPreCommitContentWrongBuildsHeraldField.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment