Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102367339
20121209.xmacromigrate.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
Wed, Feb 19, 23:43
Size
462 B
Mime Type
text/x-php
Expires
Fri, Feb 21, 23:43 (2 d)
Engine
blob
Format
Raw Data
Handle
24277671
Attached To
rPH Phabricator
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
"
;
Event Timeline
Log In to Comment