Page MenuHomePhorge

20140904.macroattach.php
No OneTemporary

Size
560 B
Referenced Files
None
Subscribers
None

20140904.macroattach.php

<?php
$table = new PhabricatorFileImageMacro();
foreach (new LiskMigrationIterator($table) as $macro) {
$name = $macro->getName();
echo pht("Linking macro '%s'...", $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 pht('Done.')."\n";

File Metadata

Mime Type
text/x-php
Expires
Mon, May 5, 12:18 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
71594
Default Alt Text
20140904.macroattach.php (560 B)

Event Timeline