@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
at recaptime-dev/main 22 lines 550 B view raw
1<?php 2 3echo pht('Generating file keys...')."\n"; 4$table = new PhabricatorFile(); 5$table->openTransaction(); 6$table->beginReadLocking(); 7 8$files = $table->loadAllWhere('secretKey IS NULL'); 9echo pht('%d files to generate keys for', count($files)); 10foreach ($files as $file) { 11 queryfx( 12 $file->establishConnection('w'), 13 'UPDATE %T SET secretKey = %s WHERE id = %d', 14 $file->getTableName(), 15 $file->generateSecretKey(), 16 $file->getID()); 17 echo '.'; 18} 19 20$table->endReadLocking(); 21$table->saveTransaction(); 22echo "\n".pht('Done.')."\n";