mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-18 03:20:59 +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";
|