mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-23 07:12:41 +01:00
7c2a7d0365
Summary: Modernize remaining edges to subclass `PhabricatorEdgeType`. Largely based on D11045. Test Plan: Browsed around and performed various actions include subscribing, unsubscribing and watching. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D11116
26 lines
543 B
PHP
26 lines
543 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(),
|
|
PhabricatorObjectHasFileEdgeType::EDGECONST ,
|
|
$phid);
|
|
}
|
|
$editor->save();
|
|
}
|
|
}
|
|
|
|
echo "Done.\n";
|