Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93613296
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
Sat, Nov 30, 04:11
Size
560 B
Mime Type
text/x-php
Expires
Mon, Dec 2, 04:11 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
22676211
Attached To
rPH Phabricator
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
"
;
Event Timeline
Log In to Comment