mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-30 01:10:58 +01:00
ffc1b5c26a
Summary: Ref T3116. In the case of anonymous signers, there's no way to do a quick way to check if someone has signed a doc since you can't query by their (nonexistent) external account ID. Move "name" and "email" to first-class columns and let the engine search for them. Test Plan: Searched for signatures with name and email fragments. Reviewers: btrahan, chad Reviewed By: chad Subscribers: epriestley Maniphest Tasks: T3116 Differential Revision: https://secure.phabricator.com/D9776
17 lines
483 B
PHP
17 lines
483 B
PHP
<?php
|
|
|
|
$table = new LegalpadDocumentSignature();
|
|
$conn_w = $table->establishConnection('w');
|
|
foreach (new LiskMigrationIterator($table) as $signature) {
|
|
echo pht("Updating Legalpad signature %d...\n", $signature->getID());
|
|
|
|
$data = $signature->getSignatureData();
|
|
|
|
queryfx(
|
|
$conn_w,
|
|
'UPDATE %T SET signerName = %s, signerEmail = %s WHERE id = %d',
|
|
$table->getTableName(),
|
|
(string)idx($data, 'name'),
|
|
(string)idx($data, 'email'),
|
|
$signature->getID());
|
|
}
|