More indentations

This commit is contained in:
Michael 2021-10-03 20:09:36 +00:00
parent cb1b5d3964
commit 0533f9bfdb

View File

@ -302,13 +302,13 @@ function mailstream_subject($item)
} }
$contact = Contact::selectFirst([], ['id' => $item['contact-id'], 'uid' => $item['uid']]); $contact = Contact::selectFirst([], ['id' => $item['contact-id'], 'uid' => $item['uid']]);
if (!DBA::isResult($contact)) { if (!DBA::isResult($contact)) {
Logger::error( Logger::error(
'mailstream_subject no contact for item', 'mailstream_subject no contact for item',
['id' => $item['id'], ['id' => $item['id'],
'plink' => $item['plink'], 'plink' => $item['plink'],
'contact id' => $item['contact-id'], 'contact id' => $item['contact-id'],
'uid' => $item['uid']] 'uid' => $item['uid']]
); );
return DI::l10n()->t("Friendica post"); return DI::l10n()->t("Friendica post");
} }
if ($contact['network'] === 'dfrn') { if ($contact['network'] === 'dfrn') {
@ -442,17 +442,17 @@ function mailstream_convert_table_entries()
$ms_item_ids = DBA::selectToArray('mailstream_item', [], ['message-id', 'uri', 'uid', 'contact-id'], ["`mailstream_item`.`completed` IS NULL"]); $ms_item_ids = DBA::selectToArray('mailstream_item', [], ['message-id', 'uri', 'uid', 'contact-id'], ["`mailstream_item`.`completed` IS NULL"]);
Logger::debug('mailstream_convert_table_entries processing ' . count($ms_item_ids) . ' items'); Logger::debug('mailstream_convert_table_entries processing ' . count($ms_item_ids) . ' items');
foreach ($ms_item_ids as $ms_item_id) { foreach ($ms_item_ids as $ms_item_id) {
$send_hook_data = array('uid' => $ms_item_id['uid'], $send_hook_data = array('uid' => $ms_item_id['uid'],
'contact-id' => $ms_item_id['contact-id'], 'contact-id' => $ms_item_id['contact-id'],
'uri' => $ms_item_id['uri'], 'uri' => $ms_item_id['uri'],
'message_id' => $ms_item_id['message-id'], 'message_id' => $ms_item_id['message-id'],
'tries' => 0); 'tries' => 0);
if (!$ms_item_id['message-id'] || !strlen($ms_item_id['message-id'])) { if (!$ms_item_id['message-id'] || !strlen($ms_item_id['message-id'])) {
Logger::info('mailstream_cron: Item ' . Logger::info('mailstream_cron: Item ' .
$ms_item_id['id'] . ' URI ' . $ms_item_id['uri'] . ' has no message-id'); $ms_item_id['id'] . ' URI ' . $ms_item_id['uri'] . ' has no message-id');
continue; continue;
} }
Logger::info('mailstream_convert_table_entries: convert item to workerqueue', $send_hook_data); Logger::info('mailstream_convert_table_entries: convert item to workerqueue', $send_hook_data);
Hook::fork(PRIORITY_LOW, 'mailstream_send_hook', $send_hook_data); Hook::fork(PRIORITY_LOW, 'mailstream_send_hook', $send_hook_data);
} }
DBA::e('DROP TABLE `mailstream_item`'); DBA::e('DROP TABLE `mailstream_item`');