Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101091780
20140904.macroattach.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 5, 16:15
Size
543 B
Mime Type
text/x-php
Expires
Fri, Feb 7, 16:15 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24093055
Attached To
rPH Phabricator
20140904.macroattach.php
View Options
<?php
$table
=
new
PhabricatorFileImageMacro
();
foreach
(
new
LiskMigrationIterator
(
$table
)
as
$macro
)
{
$name
=
$macro
->
getName
();
echo
"Linking macro '{$name}'...
\n
"
;
$editor
=
new
PhabricatorEdgeEditor
();
$phids
[]
=
$macro
->
getFilePHID
();
$phids
[]
=
$macro
->
getAudioPHID
();
$phids
=
array_filter
(
$phids
);
if
(
$phids
)
{
foreach
(
$phids
as
$phid
)
{
$editor
->
addEdge
(
$macro
->
getPHID
(),
PhabricatorObjectHasFileEdgeType
::
EDGECONST
,
$phid
);
}
$editor
->
save
();
}
}
echo
"Done.
\n
"
;
Event Timeline
Log In to Comment