Apply suggestions from code review
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
parent
87673fd0c5
commit
81c9d8d479
|
@ -107,7 +107,7 @@ function pubsub_post(App $a)
|
||||||
{
|
{
|
||||||
$xml = Network::postdata();
|
$xml = Network::postdata();
|
||||||
|
|
||||||
Logger::notice('Feed arrived from ' . $_SERVER['REMOTE_ADDR'] . ' for ' . DI::args()->getCommand() . ' with user-agent: ' . $_SERVER['HTTP_USER_AGENT']);
|
Logger::info('Feed arrived from ' . $_SERVER['REMOTE_ADDR'] . ' for ' . DI::args()->getCommand() . ' with user-agent: ' . $_SERVER['HTTP_USER_AGENT']);
|
||||||
Logger::debug('Data: ' . $xml);
|
Logger::debug('Data: ' . $xml);
|
||||||
|
|
||||||
$nick = ((DI::args()->getArgc() > 1) ? Strings::escapeTags(trim(DI::args()->getArgv()[1])) : '');
|
$nick = ((DI::args()->getArgc() > 1) ? Strings::escapeTags(trim(DI::args()->getArgv()[1])) : '');
|
||||||
|
@ -149,7 +149,7 @@ function pubsub_post(App $a)
|
||||||
hub_post_return();
|
hub_post_return();
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger::notice('Import item for ' . $nick . ' from ' . $contact['nick'] . ' (' . $contact['id'] . ')');
|
Logger::info('Import item for ' . $nick . ' from ' . $contact['nick'] . ' (' . $contact['id'] . ')');
|
||||||
$feedhub = '';
|
$feedhub = '';
|
||||||
OStatus::import($xml, $importer, $contact, $feedhub);
|
OStatus::import($xml, $importer, $contact, $feedhub);
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ function pubsubhubbub_init(App $a) {
|
||||||
throw new \Friendica\Network\HTTPException\NotFoundException();
|
throw new \Friendica\Network\HTTPException\NotFoundException();
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger::notice("$hub_mode request from " . $_SERVER['REMOTE_ADDR']);
|
Logger::info("$hub_mode request from " . $_SERVER['REMOTE_ADDR']);
|
||||||
|
|
||||||
if (DI::args()->getArgc() > 1) {
|
if (DI::args()->getArgc() > 1) {
|
||||||
// Normally the url should now contain the nick name as last part of the url
|
// Normally the url should now contain the nick name as last part of the url
|
||||||
|
|
|
@ -535,12 +535,12 @@ class OStatus
|
||||||
foreach (self::$itemlist as $item) {
|
foreach (self::$itemlist as $item) {
|
||||||
$found = Post::exists(['uid' => $importer["uid"], 'uri' => $item["uri"]]);
|
$found = Post::exists(['uid' => $importer["uid"], 'uri' => $item["uri"]]);
|
||||||
if ($found) {
|
if ($found) {
|
||||||
Logger::info("Item with uri ".$item["uri"]." for user ".$importer["uid"]." already exists.");
|
Logger::notice("Item with uri ".$item["uri"]." for user ".$importer["uid"]." already exists.");
|
||||||
} elseif ($item['contact-id'] < 0) {
|
} elseif ($item['contact-id'] < 0) {
|
||||||
Logger::info("Item with uri ".$item["uri"]." is from a blocked contact.");
|
Logger::notice("Item with uri ".$item["uri"]." is from a blocked contact.");
|
||||||
} else {
|
} else {
|
||||||
$ret = Item::insert($item);
|
$ret = Item::insert($item);
|
||||||
Logger::notice("Item with uri ".$item["uri"]." for user ".$importer["uid"].' stored. Return value: '.$ret);
|
Logger::info("Item with uri ".$item["uri"]." for user ".$importer["uid"].' stored. Return value: '.$ret);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ class Salmon
|
||||||
{
|
{
|
||||||
$ret = [];
|
$ret = [];
|
||||||
|
|
||||||
Logger::notice('Fetching salmon key for '.$uri);
|
Logger::info('Fetching salmon key for '.$uri);
|
||||||
|
|
||||||
$arr = Probe::lrdd($uri);
|
$arr = Probe::lrdd($uri);
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ class Salmon
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger::notice('slapper called for '.$url.'. Data: ' . $slap);
|
Logger::info('slapper called for '.$url.'. Data: ' . $slap);
|
||||||
|
|
||||||
// create a magic envelope
|
// create a magic envelope
|
||||||
|
|
||||||
|
@ -209,7 +209,7 @@ class Salmon
|
||||||
$return_code = $postResult->getReturnCode();
|
$return_code = $postResult->getReturnCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger::notice('slapper for '.$url.' returned ' . $return_code);
|
Logger::info('slapper for '.$url.' returned ' . $return_code);
|
||||||
|
|
||||||
if (! $return_code) {
|
if (! $return_code) {
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -72,7 +72,7 @@ class PubSubPublish
|
||||||
$ret = $postResult->getReturnCode();
|
$ret = $postResult->getReturnCode();
|
||||||
|
|
||||||
if ($ret >= 200 && $ret <= 299) {
|
if ($ret >= 200 && $ret <= 299) {
|
||||||
Logger::notice('Successfully pushed to ' . $subscriber['callback_url']);
|
Logger::info('Successfully pushed to ' . $subscriber['callback_url']);
|
||||||
|
|
||||||
PushSubscriber::reset($subscriber['id'], $last_update);
|
PushSubscriber::reset($subscriber['id'], $last_update);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -57,7 +57,7 @@ function frio_install()
|
||||||
Hook::register('nav_info', 'view/theme/frio/theme.php', 'frio_remote_nav');
|
Hook::register('nav_info', 'view/theme/frio/theme.php', 'frio_remote_nav');
|
||||||
Hook::register('display_item', 'view/theme/frio/theme.php', 'frio_display_item');
|
Hook::register('display_item', 'view/theme/frio/theme.php', 'frio_display_item');
|
||||||
|
|
||||||
Logger::notice('installed theme frio');
|
Logger::info('installed theme frio');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue
Block a user