Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F956808
20150622.metamta.5.actor-phid-mig.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
555 B
Referenced Files
None
Subscribers
None
20150622.metamta.5.actor-phid-mig.php
View Options
<?php
$table
=
new
PhabricatorMetaMTAMail
();
$conn_w
=
$table
->
establishConnection
(
'w'
);
echo
pht
(
'Assigning actorPHIDs to mails...'
).
"
\n
"
;
foreach
(
new
LiskMigrationIterator
(
$table
)
as
$mail
)
{
$id
=
$mail
->
getID
();
echo
pht
(
'Updating mail %d...'
,
$id
).
"
\n
"
;
if
(
$mail
->
getActorPHID
())
{
continue
;
}
$actor_phid
=
$mail
->
getFrom
();
if
(
$actor_phid
===
null
)
{
continue
;
}
queryfx
(
$conn_w
,
'UPDATE %T SET actorPHID = %s WHERE id = %d'
,
$table
->
getTableName
(),
$actor_phid
,
$id
);
}
echo
pht
(
'Done.'
).
"
\n
"
;
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Jun 17, 6:07 PM (1 d, 23 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
226835
Default Alt Text
20150622.metamta.5.actor-phid-mig.php (555 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment