2013-07-16 22:31:20 +02:00
|
|
|
<?php
|
|
|
|
|
2015-05-22 09:27:56 +02:00
|
|
|
echo pht('Giving Pholio images PHIDs');
|
2013-07-16 22:31:20 +02:00
|
|
|
$table = new PholioImage();
|
|
|
|
$table->openTransaction();
|
|
|
|
|
|
|
|
foreach (new LiskMigrationIterator($table) as $image) {
|
|
|
|
if ($image->getPHID()) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2014-06-09 20:36:49 +02:00
|
|
|
echo '.';
|
2013-07-16 22:31:20 +02:00
|
|
|
|
|
|
|
queryfx(
|
|
|
|
$image->establishConnection('w'),
|
|
|
|
'UPDATE %T SET phid = %s WHERE id = %d',
|
|
|
|
$image->getTableName(),
|
|
|
|
$image->generatePHID(),
|
|
|
|
$image->getID());
|
|
|
|
}
|
|
|
|
|
|
|
|
$table->saveTransaction();
|
2015-05-22 09:27:56 +02:00
|
|
|
echo "\n".pht('Done.')."\n";
|