Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101255792
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
Fri, Feb 7, 05:49
Size
446 B
Mime Type
text/x-php
Expires
Sun, Feb 9, 05:49 (2 d)
Engine
blob
Format
Raw Data
Handle
24116676
Attached To
rPH Phabricator
20121209.xmacromigrate.php
View Options
<?php
echo
"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
Done.
\n
"
;
Event Timeline
Log In to Comment