Page MenuHomePhorge

legalpad-mailkey-populate.php
No OneTemporary

Size
606 B
Referenced Files
None
Subscribers
None

legalpad-mailkey-populate.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";

File Metadata

Mime Type
text/x-php
Expires
Tue, May 6, 3:14 AM (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
80134
Default Alt Text
legalpad-mailkey-populate.php (606 B)

Event Timeline