1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-16 03:42:41 +01:00
phorge-phorge/resources/sql/autopatches/20140629.legalsig.2.php

18 lines
483 B
PHP
Raw Normal View History

<?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());
}