Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F949812
20121209.xmacromigrate.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
462 B
Referenced Files
None
Subscribers
None
20121209.xmacromigrate.php
View Options
<?php
echo
pht
(
'Giving image macros PHIDs'
);
$table
=
new
PhabricatorFileImageMacro
();
$table
->
openTransaction
();
foreach
(
new
LiskMigrationIterator
(
$table
)
as
$macro
)
{
if
(
$macro
->
getPHID
())
{
continue
;
}
echo
'.'
;
queryfx
(
$macro
->
establishConnection
(
'w'
),
'UPDATE %T SET phid = %s WHERE id = %d'
,
$macro
->
getTableName
(),
$macro
->
generatePHID
(),
$macro
->
getID
());
}
$table
->
saveTransaction
();
echo
"
\n
"
.
pht
(
'Done.'
).
"
\n
"
;
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Jun 17, 1:46 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
223940
Default Alt Text
20121209.xmacromigrate.php (462 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment