Replace call for Logger with DI::logger() in ifttt addon

pull/1594/head
Art4 2025-01-24 11:40:32 +00:00
parent e7755584cb
commit 15a951235f
1 changed files with 5 additions and 6 deletions

View File

@ -8,7 +8,6 @@
*/
use Friendica\Content\PageInfo;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\Core\Worker;
use Friendica\Database\DBA;
@ -86,16 +85,16 @@ function ifttt_post()
$user = DBA::selectFirst('user', ['uid'], ['nickname' => $nickname]);
if (!DBA::isResult($user)) {
Logger::info('User ' . $nickname . ' not found.');
DI::logger()->info('User ' . $nickname . ' not found.');
return;
}
$uid = $user['uid'];
Logger::info('Received a post for user ' . $uid . ' from ifttt ' . print_r($_REQUEST, true));
DI::logger()->info('Received a post for user ' . $uid . ' from ifttt ' . print_r($_REQUEST, true));
if (!isset($_REQUEST['key'])) {
Logger::notice('No key found.');
DI::logger()->notice('No key found.');
return;
}
@ -103,7 +102,7 @@ function ifttt_post()
// Check the key
if ($key != DI::pConfig()->get($uid, 'ifttt', 'key')) {
Logger::info('Invalid key for user ' . $uid);
DI::logger()->info('Invalid key for user ' . $uid);
return;
}
@ -114,7 +113,7 @@ function ifttt_post()
}
if (!in_array($item['type'], ['status', 'link', 'photo'])) {
Logger::info('Unknown item type ' . $item['type']);
DI::logger()->info('Unknown item type ' . $item['type']);
return;
}