Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F547402
PhabricatorPHIDMailStamp.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1000 B
Referenced Files
None
Subscribers
None
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
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 1:32 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
97098
Default Alt Text
PhabricatorPHIDMailStamp.php (1000 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment