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
25 lines
671 B
PHP
25 lines
671 B
PHP
<?php
|
|
|
|
$conn_w = id(new PhabricatorProject())->establishConnection('w');
|
|
$table_name = id(new PhabricatorProjectCustomFieldStorage())->getTableName();
|
|
|
|
$rows = new LiskRawMigrationIterator($conn_w, 'project_profile');
|
|
|
|
echo pht('Migrating project descriptions to custom storage...')."\n";
|
|
foreach ($rows as $row) {
|
|
$phid = $row['projectPHID'];
|
|
|
|
$desc = $row['blurb'];
|
|
if (strlen($desc)) {
|
|
queryfx(
|
|
$conn_w,
|
|
'INSERT IGNORE INTO %T (objectPHID, fieldIndex, fieldValue)
|
|
VALUES (%s, %s, %s)',
|
|
$table_name,
|
|
$phid,
|
|
PhabricatorHash::digestForIndex('std:project:internal:description'),
|
|
$desc);
|
|
}
|
|
}
|
|
|
|
echo pht('Done.')."\n";
|