mirror of
https://github.com/friendica/friendica
synced 2024-11-10 03:02:54 +00:00
Add missing use statements in modules classes
This commit is contained in:
parent
d2da2492b7
commit
47d9f91009
5 changed files with 5 additions and 5 deletions
|
@ -25,6 +25,7 @@ use Friendica\App\Router;
|
||||||
use Friendica\Core\System;
|
use Friendica\Core\System;
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
use Friendica\DI;
|
use Friendica\DI;
|
||||||
|
use Friendica\Model\Group;
|
||||||
use Friendica\Module\BaseApi;
|
use Friendica\Module\BaseApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -61,7 +62,7 @@ class Accounts extends BaseApi
|
||||||
DI::mstdnError()->UnprocessableEntity();
|
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 (!Session::getLocalUser()) {
|
||||||
if ($interactive) {
|
if ($interactive) {
|
||||||
DI::sysmsg()->addNotice(DI::l10n()->t('Please login to continue.'));
|
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');
|
DI::baseUrl()->redirect('login');
|
||||||
} else {
|
} else {
|
||||||
throw new HTTPException\UnauthorizedException(DI::l10n()->t('Please login to continue.'));
|
throw new HTTPException\UnauthorizedException(DI::l10n()->t('Please login to continue.'));
|
||||||
|
|
|
@ -41,8 +41,6 @@ use Friendica\Network\HTTPException;
|
||||||
class Community extends BaseModule
|
class Community extends BaseModule
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @name CP
|
|
||||||
*
|
|
||||||
* Type of the community page
|
* Type of the community page
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -24,6 +24,7 @@ namespace Friendica\Module;
|
||||||
use Friendica\BaseModule;
|
use Friendica\BaseModule;
|
||||||
use Friendica\Core\Hook;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
|
use Friendica\Core\Session;
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
use Friendica\DI;
|
use Friendica\DI;
|
||||||
use Friendica\Model\Notification;
|
use Friendica\Model\Notification;
|
||||||
|
|
|
@ -36,7 +36,7 @@ class HCard extends BaseModule
|
||||||
{
|
{
|
||||||
protected function content(array $request = []): string
|
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
|
// A logged in user views a profile of a user
|
||||||
$nickname = DI::app()->getLoggedInUserNickname();
|
$nickname = DI::app()->getLoggedInUserNickname();
|
||||||
} elseif (empty($this->parameters['action'])) {
|
} elseif (empty($this->parameters['action'])) {
|
||||||
|
|
Loading…
Reference in a new issue