mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-29 18:22:41 +01:00
16 lines
400 B
PHP
16 lines
400 B
PHP
|
<?php
|
||
|
|
||
|
echo "Generating file keys...\n";
|
||
|
$files = id(new PhabricatorFile())->loadAllWhere('secretKey IS NULL');
|
||
|
echo count($files).' files to generate keys for';
|
||
|
foreach ($files as $file) {
|
||
|
queryfx(
|
||
|
$file->establishConnection('r'),
|
||
|
'UPDATE %T SET secretKey = %s WHERE id = %d',
|
||
|
$file->getTableName(),
|
||
|
$file->generateSecretKey(),
|
||
|
$file->getID());
|
||
|
echo '.';
|
||
|
}
|
||
|
echo "\nDone.\n";
|