mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-13 02:12:41 +01:00
27 lines
542 B
PHP
27 lines
542 B
PHP
|
<?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(),
|
||
|
PhabricatorEdgeConfig::TYPE_OBJECT_HAS_FILE,
|
||
|
$phid);
|
||
|
}
|
||
|
$editor->save();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
echo "Done.\n";
|