slow progress removing bitfields on item table

This commit is contained in:
friendica
2015-01-21 16:06:25 -08:00
parent 51848c6190
commit 29436081a8
20 changed files with 154 additions and 177 deletions

View File

@@ -93,26 +93,6 @@ function externals_run($argv, $argc){
$results = process_delivery(array('hash' => 'undefined'), get_item_elements($message),
array(array('hash' => $sys['xchan_hash'])), false, true);
$total ++;
// $z = q("select id from item where mid = '%s' and uid = %d limit 1",
// dbesc($message['message_id']),
// intval($sys['channel_id'])
// );
$z = null;
if($z) {
$flag_bits = ITEM_WALL|ITEM_ORIGIN|ITEM_UPLINK;
// preserve the source
$r = q("update item set source_xchan = owner_xchan where id = %d",
intval($z[0]['id'])
);
$r = q("update item set item_flags = ( item_flags | %d ), owner_xchan = '%s'
where id = %d",
intval($flag_bits),
dbesc($sys['xchan_hash']),
intval($z[0]['id'])
);
}
}
logger('externals: import_public_posts: ' . $total . ' messages imported', LOGGER_DEBUG);
}