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

index 91665640890459fdc2e79f1a6b7c6546a31ef1ea..4cf5d7ff33078cedf0e5187f431293e068a97578 100644 (file)
@@ -3,7 +3,6 @@
 namespace Friendica\Addon\ratioed;
 
 use Friendica\Content\Pager;
-use Friendica\Core\Logger;
 use Friendica\Core\Renderer;
 use Friendica\Database\DBA;
 use Friendica\DI;
@@ -260,7 +259,7 @@ FROM (
 
        protected function setupUserCallback(): \Closure
        {
-               Logger::debug("ratioed: setupUserCallback");
+               DI::logger()->debug("ratioed: setupUserCallback");
                $parentCallback = parent::setupUserCallback();
                return function ($user) use ($parentCallback) {
                        $blocked_count = DBA::count('user-contact', ['uid' => $user['uid'], 'is-blocked' => 1]);
@@ -310,7 +309,7 @@ FROM (
                        $this->fillReplyGuyData($user);
 
                        $user = $parentCallback($user);
-                       Logger::debug("ratioed: setupUserCallback", [
+                       DI::logger()->debug("ratioed: setupUserCallback", [
                                'uid' => $user['uid'],
                                'blocked_by' => $user['blocked_by'],
                                'comments' => $user['comments'],
index 443fdaa906139898af7be74b5dcecccfe22bf064..5cc6d539f92fec1d2ad81fd7a80b29ed94895ae2 100644 (file)
@@ -8,7 +8,6 @@
 
 use Friendica\Addon\ratioed\RatioedPanel;
 use Friendica\Core\Hook;
-use Friendica\Core\Logger;
 use Friendica\DI;
 
 /**
@@ -18,7 +17,7 @@ function ratioed_install()
 {
        Hook::register('moderation_users_tabs', 'addon/ratioed/ratioed.php', 'ratioed_users_tabs');
 
-       Logger::info("ratioed: installed");
+       DI::logger()->info("ratioed: installed");
 }
 
 /**
@@ -34,7 +33,7 @@ function ratioed_module() {}
  * @param array $arr Parameters, including "tabs" which is the list to modify, and "selectedTab", which is the currently selected tab ID
  */
 function ratioed_users_tabs(array &$arr) {
-       Logger::debug("ratioed: users tabs");
+       DI::logger()->debug("ratioed: users tabs");
 
        array_push($arr['tabs'], [
                'label'  => DI::l10n()->t('Behaviour'),
@@ -50,7 +49,7 @@ function ratioed_users_tabs(array &$arr) {
  * @brief Displays the ratioed tab in the moderation panel
  */
 function ratioed_content() {
-       Logger::debug("ratioed: content");
+       DI::logger()->debug("ratioed: content");
 
        $ratioed = DI::getDice()->create(RatioedPanel::class, [$_SERVER]);
        $httpException = DI::getDice()->create(Friendica\Module\Special\HTTPException::class);