mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-01 11:12:42 +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";
|