Page MenuHomec4science

20140629.legalsig.2.php
No OneTemporary

File Metadata

Created
Mon, Dec 2, 09:30

20140629.legalsig.2.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());
}

Event Timeline