2014-09-04 21:50:51 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
$table = new PhabricatorFileImageMacro();
|
|
|
|
foreach (new LiskMigrationIterator($table) as $macro) {
|
|
|
|
$name = $macro->getName();
|
|
|
|
|
2015-05-22 09:27:56 +02:00
|
|
|
echo pht("Linking macro '%s'...", $name)."\n";
|
2014-09-04 21:50:51 +02:00
|
|
|
|
|
|
|
$editor = new PhabricatorEdgeEditor();
|
|
|
|
|
|
|
|
$phids[] = $macro->getFilePHID();
|
|
|
|
$phids[] = $macro->getAudioPHID();
|
|
|
|
$phids = array_filter($phids);
|
|
|
|
|
|
|
|
if ($phids) {
|
|
|
|
foreach ($phids as $phid) {
|
|
|
|
$editor->addEdge(
|
|
|
|
$macro->getPHID(),
|
2022-05-13 00:10:01 +02:00
|
|
|
25,
|
2014-09-04 21:50:51 +02:00
|
|
|
$phid);
|
|
|
|
}
|
|
|
|
$editor->save();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-05-22 09:27:56 +02:00
|
|
|
echo pht('Done.')."\n";
|