mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 22:10:55 +01:00
36e2d02d6e
Summary: `pht`ize a whole bunch of strings in rP. Test Plan: Intense eyeballing. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: hach-que, Korvin, epriestley Differential Revision: https://secure.phabricator.com/D12797
27 lines
658 B
PHP
27 lines
658 B
PHP
<?php
|
|
|
|
// This corrects files which incorrectly had a 'cancdn' property written;
|
|
// the property should be 'canCDN'.
|
|
|
|
$table = new PhabricatorFile();
|
|
$conn_w = $table->establishConnection('w');
|
|
foreach (new LiskMigrationIterator($table) as $file) {
|
|
$id = $file->getID();
|
|
echo pht(
|
|
"Updating capitalization of %s property for file %d...\n",
|
|
'canCDN',
|
|
$id);
|
|
$meta = $file->getMetadata();
|
|
|
|
if (isset($meta['cancdn'])) {
|
|
$meta['canCDN'] = $meta['cancdn'];
|
|
unset($meta['cancdn']);
|
|
|
|
queryfx(
|
|
$conn_w,
|
|
'UPDATE %T SET metadata = %s WHERE id = %d',
|
|
$table->getTableName(),
|
|
json_encode($meta),
|
|
$id);
|
|
}
|
|
}
|