Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101878658
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 14, 16:42
Size
446 B
Mime Type
text/x-php
Expires
Sun, Feb 16, 16:42 (2 d)
Engine
blob
Format
Raw Data
Handle
24246399
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