Changeset View
Changeset View
Standalone View
Standalone View
resources/sql/patches/079.nametokenindex.php
| <?php | <?php | ||||
| echo "Indexing username tokens for typeaheads...\n"; | echo pht('Indexing username tokens for typeaheads...')."\n"; | ||||
| $table = new PhabricatorUser(); | $table = new PhabricatorUser(); | ||||
| $table->openTransaction(); | $table->openTransaction(); | ||||
| $table->beginReadLocking(); | $table->beginReadLocking(); | ||||
| $users = $table->loadAll(); | $users = $table->loadAll(); | ||||
| echo count($users).' users to index'; | echo pht('%d users to index', count($users)); | ||||
| foreach ($users as $user) { | foreach ($users as $user) { | ||||
| $user->updateNameTokens(); | $user->updateNameTokens(); | ||||
| echo '.'; | echo '.'; | ||||
| } | } | ||||
| $table->endReadLocking(); | $table->endReadLocking(); | ||||
| $table->saveTransaction(); | $table->saveTransaction(); | ||||
| echo "\nDone.\n"; | echo "\n".pht('Done.')."\n"; | ||||