]> git.mxchange.org Git - friendica-addons.git/commitdiff
Replace call for Logger with DI::logger() in ifttt addon
authorArt4 <art4@wlabs.de>
Fri, 24 Jan 2025 11:40:32 +0000 (11:40 +0000)
committerArt4 <art4@wlabs.de>
Fri, 24 Jan 2025 11:40:32 +0000 (11:40 +0000)
ifttt/ifttt.php

index 51fa8db81b68396287d7ef4f7a190781eaf21eed..cb23032bee9ff36a76c31a4b2137bb4311fd7056 100644 (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;
        }