2014-09-04 21:50:51 +02:00
|
|
|
<?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(),
|
2015-01-03 00:33:25 +01:00
|
|
|
PhabricatorObjectHasFileEdgeType::EDGECONST ,
|
2014-09-04 21:50:51 +02:00
|
|
|
$phid);
|
|
|
|
}
|
|
|
|
$editor->save();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
echo "Done.\n";
|