]> git.mxchange.org Git - friendica.git/commitdiff
Add missing use statements in modules classes
authorHypolite Petovan <hypolite@mrpetovan.com>
Wed, 19 Oct 2022 13:00:43 +0000 (09:00 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Wed, 19 Oct 2022 13:02:53 +0000 (09:02 -0400)
src/Module/Api/Mastodon/Lists/Accounts.php
src/Module/BaseAdmin.php
src/Module/Conversation/Community.php
src/Module/Delegation.php
src/Module/HCard.php

index 413cacae29895e8614efaf94ce2c6d65edc4033f..b964ff9ba3db48c1a1683db1490f6afaba5185f8 100644 (file)
@@ -25,6 +25,7 @@ use Friendica\App\Router;
 use Friendica\Core\System;
 use Friendica\Database\DBA;
 use Friendica\DI;
+use Friendica\Model\Group;
 use Friendica\Module\BaseApi;
 
 /**
@@ -61,7 +62,7 @@ class Accounts extends BaseApi
                        DI::mstdnError()->UnprocessableEntity();
                }
 
-               return Group::addMembers($this->parameters['id'], $request['account_ids']);
+               Group::addMembers($this->parameters['id'], $request['account_ids']);
        }
 
        /**
index f383941c432822d09b8ed180860a113220bb66f3..f80323ca596448793715190e1dba6d75795e1dcb 100644 (file)
@@ -55,7 +55,7 @@ abstract class BaseAdmin extends BaseModule
                if (!Session::getLocalUser()) {
                        if ($interactive) {
                                DI::sysmsg()->addNotice(DI::l10n()->t('Please login to continue.'));
-                               Session::set('return_path', DI::args()->getQueryString());
+                               DI::session()->set('return_path', DI::args()->getQueryString());
                                DI::baseUrl()->redirect('login');
                        } else {
                                throw new HTTPException\UnauthorizedException(DI::l10n()->t('Please login to continue.'));
index a5bfe41908bb267cf9f2b4168eee1716c2fcc3d6..539905503f50259b774e4c04db119e244235a897 100644 (file)
@@ -41,8 +41,6 @@ use Friendica\Network\HTTPException;
 class Community extends BaseModule
 {
        /**
-        * @name CP
-        *
         * Type of the community page
         * @{
         */
index ba1f0298d70841f7a4258ed7a016354be642b79d..f1e2a792e10cabfab6e3e84a3dece3aaf0564540 100644 (file)
@@ -24,6 +24,7 @@ namespace Friendica\Module;
 use Friendica\BaseModule;
 use Friendica\Core\Hook;
 use Friendica\Core\Renderer;
+use Friendica\Core\Session;
 use Friendica\Database\DBA;
 use Friendica\DI;
 use Friendica\Model\Notification;
index aee93e34b53533f3af28c8d3abaaee805f2022a4..4a1f0cdfabd9cf3e77c0a4d947fbf26779316970 100644 (file)
@@ -36,7 +36,7 @@ class HCard extends BaseModule
 {
        protected function content(array $request = []): string
        {
-               if ((Session::getLocalUser()) && ($this->parameters['action'] ?? '') === 'view') {
+               if (Session::getLocalUser() && ($this->parameters['action'] ?? '') === 'view') {
                        // A logged in user views a profile of a user
                        $nickname = DI::app()->getLoggedInUserNickname();
                } elseif (empty($this->parameters['action'])) {