From: Hypolite Petovan Date: Wed, 19 Oct 2022 13:00:43 +0000 (-0400) Subject: Add missing use statements in modules classes X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=47d9f91009d48fc084533ba69d67af232be8241a;p=friendica.git Add missing use statements in modules classes --- diff --git a/src/Module/Api/Mastodon/Lists/Accounts.php b/src/Module/Api/Mastodon/Lists/Accounts.php index 413cacae29..b964ff9ba3 100644 --- a/src/Module/Api/Mastodon/Lists/Accounts.php +++ b/src/Module/Api/Mastodon/Lists/Accounts.php @@ -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']); } /** diff --git a/src/Module/BaseAdmin.php b/src/Module/BaseAdmin.php index f383941c43..f80323ca59 100644 --- a/src/Module/BaseAdmin.php +++ b/src/Module/BaseAdmin.php @@ -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.')); diff --git a/src/Module/Conversation/Community.php b/src/Module/Conversation/Community.php index a5bfe41908..539905503f 100644 --- a/src/Module/Conversation/Community.php +++ b/src/Module/Conversation/Community.php @@ -41,8 +41,6 @@ use Friendica\Network\HTTPException; class Community extends BaseModule { /** - * @name CP - * * Type of the community page * @{ */ diff --git a/src/Module/Delegation.php b/src/Module/Delegation.php index ba1f0298d7..f1e2a792e1 100644 --- a/src/Module/Delegation.php +++ b/src/Module/Delegation.php @@ -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; diff --git a/src/Module/HCard.php b/src/Module/HCard.php index aee93e34b5..4a1f0cdfab 100644 --- a/src/Module/HCard.php +++ b/src/Module/HCard.php @@ -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'])) {