mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-21 04:50:55 +01:00
25ae4c458d
Test Plan: currently untested work in progress Reviewers: #blessed_reviewers, epriestley Subscribers: rush898, aklapper, Korvin, epriestley Projects: #wikimedia Maniphest Tasks: T5685 Differential Revision: https://secure.phabricator.com/D10054
20 lines
453 B
PHP
20 lines
453 B
PHP
<?php
|
|
|
|
$table = new PhabricatorFile();
|
|
$conn_w = $table->establishConnection('w');
|
|
foreach (new LiskMigrationIterator($table) as $file) {
|
|
$id = $file->getID();
|
|
echo "Updating flags for file {$id}...\n";
|
|
$meta = $file->getMetadata();
|
|
if (!idx($meta, 'canCDN')) {
|
|
|
|
$meta['canCDN'] = true;
|
|
|
|
queryfx(
|
|
$conn_w,
|
|
'UPDATE %T SET metadata = %s WHERE id = %d',
|
|
$table->getTableName(),
|
|
json_encode($meta),
|
|
$id);
|
|
}
|
|
}
|