Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F90062041
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
Mon, Oct 28, 23:38
Size
560 B
Mime Type
text/x-php
Expires
Wed, Oct 30, 23:38 (19 h, 50 m)
Engine
blob
Format
Raw Data
Handle
22001199
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