Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91249913
PhabricatorPHIDMailStamp.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
Sat, Nov 9, 08:49
Size
1000 B
Mime Type
text/x-php
Expires
Mon, Nov 11, 08:49 (2 d)
Engine
blob
Format
Raw Data
Handle
22225919
Attached To
rPH Phabricator
PhabricatorPHIDMailStamp.php
View Options
<?php
final
class
PhabricatorPHIDMailStamp
extends
PhabricatorMailStamp
{
const
STAMPTYPE
=
'phid'
;
public
function
renderStamps
(
$value
)
{
if
(
$value
===
null
)
{
return
null
;
}
$value
=
(
array
)
$value
;
if
(!
$value
)
{
return
null
;
}
// TODO: This recovers from a bug where blocking reviewers were serialized
// incorrectly into the flat mail stamp list in the worker queue as arrays.
// It can be removed some time after February 2018.
foreach
(
$value
as
$key
=>
$v
)
{
if
(
is_array
(
$v
))
{
unset
(
$value
[
$key
]);
}
}
$viewer
=
$this
->
getViewer
();
$handles
=
$viewer
->
loadHandles
(
$value
);
$results
=
array
();
foreach
(
$value
as
$phid
)
{
$handle
=
$handles
[
$phid
];
$mail_name
=
$handle
->
getMailStampName
();
if
(
$mail_name
===
null
)
{
$mail_name
=
$handle
->
getPHID
();
}
$results
[]
=
$this
->
renderStamp
(
$this
->
getKey
(),
$mail_name
);
}
return
$results
;
}
}
Event Timeline
Log In to Comment