Add missing use statements in modules classes

This commit is contained in:
Hypolite Petovan 2022-10-19 09:00:43 -04:00
parent d2da2492b7
commit 47d9f91009
5 changed files with 5 additions and 5 deletions

View 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']);
}
/**

View 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.'));

View File

@ -41,8 +41,6 @@ use Friendica\Network\HTTPException;
class Community extends BaseModule
{
/**
* @name CP
*
* Type of the community page
* @{
*/

View 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;

View 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'])) {