Add missing use statements in modules classes
This commit is contained in:
parent
d2da2492b7
commit
47d9f91009
|
@ -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']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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.'));
|
||||
|
|
|
@ -41,8 +41,6 @@ use Friendica\Network\HTTPException;
|
|||
class Community extends BaseModule
|
||||
{
|
||||
/**
|
||||
* @name CP
|
||||
*
|
||||
* Type of the community page
|
||||
* @{
|
||||
*/
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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'])) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user