mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-16 03:42:41 +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
606 B
PHP
25 lines
606 B
PHP
<?php
|
|
|
|
echo pht('Populating Legalpad Documents with mail keys...')."\n";
|
|
$table = new LegalpadDocument();
|
|
$table->openTransaction();
|
|
|
|
foreach (new LiskMigrationIterator($table) as $document) {
|
|
$id = $document->getID();
|
|
|
|
echo pht('Document %s: ', $id);
|
|
if (!$document->getMailKey()) {
|
|
queryfx(
|
|
$document->establishConnection('w'),
|
|
'UPDATE %T SET mailKey = %s WHERE id = %d',
|
|
$document->getTableName(),
|
|
Filesystem::readRandomCharacters(20),
|
|
$id);
|
|
echo pht('Generated Key')."\n";
|
|
} else {
|
|
echo "-\n";
|
|
}
|
|
}
|
|
|
|
$table->saveTransaction();
|
|
echo pht('Done.')."\n";
|