Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F458536
20140904.macroattach.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
560 B
Referenced Files
None
Subscribers
None
20140904.macroattach.php
View Options
<?php
$table
=
new
PhabricatorFileImageMacro
();
foreach
(
new
LiskMigrationIterator
(
$table
)
as
$macro
)
{
$name
=
$macro
->
getName
();
echo
pht
(
"Linking macro '%s'..."
,
$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
pht
(
'Done.'
).
"
\n
"
;
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 5, 12:18 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
71594
Default Alt Text
20140904.macroattach.php (560 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment