mirror of
https://github.com/friendica/friendica
synced 2025-04-23 14:30:11 +00:00
Merge branch 'develop' into phpstan-level-1-in-addons
This commit is contained in:
commit
e17012801f
17 changed files with 40 additions and 43 deletions
|
@ -31,7 +31,7 @@ class Details extends BaseAdmin
|
|||
self::checkFormSecurityTokenRedirectOnError($redirect, 'admin_addons_details');
|
||||
|
||||
$func = $addon . '_addon_admin_post';
|
||||
$func(DI::app());
|
||||
$func();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,8 +42,6 @@ class Details extends BaseAdmin
|
|||
{
|
||||
parent::content();
|
||||
|
||||
$a = DI::app();
|
||||
|
||||
$addons_admin = Addon::getAdminList();
|
||||
|
||||
$addon = Strings::sanitizeFilePathItem($this->parameters['addon']);
|
||||
|
|
|
@ -20,8 +20,6 @@ class DBSync extends BaseAdmin
|
|||
{
|
||||
parent::content();
|
||||
|
||||
$a = DI::app();
|
||||
|
||||
$action = $this->parameters['action'] ?? '';
|
||||
$update = $this->parameters['update'] ?? 0;
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@ class Directory extends BaseModule
|
|||
{
|
||||
protected function content(array $request = []): string
|
||||
{
|
||||
$app = DI::app();
|
||||
$config = DI::config();
|
||||
|
||||
if (($config->get('system', 'block_public') && !DI::userSession()->isAuthenticated()) ||
|
||||
|
|
|
@ -30,7 +30,6 @@ class Invite extends BaseModule
|
|||
|
||||
self::checkFormSecurityTokenRedirectOnError('/', 'send_invite');
|
||||
|
||||
$app = DI::app();
|
||||
$config = DI::config();
|
||||
|
||||
$max_invites = intval($config->get('system', 'max_invites'));
|
||||
|
@ -117,7 +116,6 @@ class Invite extends BaseModule
|
|||
throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
|
||||
}
|
||||
|
||||
$app = DI::app();
|
||||
$config = DI::config();
|
||||
|
||||
$inviteOnly = false;
|
||||
|
@ -142,7 +140,7 @@ class Invite extends BaseModule
|
|||
if (Register::getPolicy() === Register::CLOSED) {
|
||||
return DI::l10n()->t('Our apologies. This system is not currently configured to connect with other public sites or invite members.');
|
||||
} else {
|
||||
$linkTxt = DI::l10n()->t('To accept this invitation, please visit and register at %s.', DI::baseUrl() . '/register'
|
||||
$linkTxt = DI::l10n()->t('To accept this invitation, please visit and register at %s.', DI::baseUrl() . '/register'
|
||||
. "\r\n" . "\r\n" . DI::l10n()->t('Friendica sites all inter-connect to create a huge privacy-enhanced social web that is owned and controlled by its members. They can also connect with many traditional social networks.'));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,8 +22,6 @@ class NoScrape extends BaseModule
|
|||
{
|
||||
protected function rawContent(array $request = [])
|
||||
{
|
||||
$a = DI::app();
|
||||
|
||||
if (isset($this->parameters['nick'])) {
|
||||
// Get infos about a specific nick (public)
|
||||
$which = $this->parameters['nick'];
|
||||
|
|
|
@ -7,7 +7,9 @@
|
|||
|
||||
namespace Friendica\Module\Profile;
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\App\Arguments;
|
||||
use Friendica\App\BaseURL;
|
||||
use Friendica\AppHelper;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Session\Capability\IHandleUserSessions;
|
||||
use Friendica\DI;
|
||||
|
@ -21,23 +23,37 @@ use Psr\Log\LoggerInterface;
|
|||
|
||||
class Media extends BaseProfile
|
||||
{
|
||||
/**
|
||||
* @var AppHelper
|
||||
*/
|
||||
private $appHelper;
|
||||
|
||||
/**
|
||||
* @var IHandleUserSessions
|
||||
*/
|
||||
private $userSession;
|
||||
|
||||
public function __construct(L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $userSession, $server, array $parameters = [])
|
||||
{
|
||||
public function __construct(
|
||||
L10n $l10n,
|
||||
BaseURL $baseUrl,
|
||||
Arguments $args,
|
||||
AppHelper $appHelper,
|
||||
LoggerInterface $logger,
|
||||
Profiler $profiler,
|
||||
Response $response,
|
||||
IHandleUserSessions $userSession,
|
||||
$server,
|
||||
array $parameters = []
|
||||
) {
|
||||
parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
|
||||
|
||||
$this->appHelper = $appHelper;
|
||||
$this->userSession = $userSession;
|
||||
}
|
||||
|
||||
protected function content(array $request = []): string
|
||||
{
|
||||
$a = DI::app();
|
||||
|
||||
$profile = ProfileModel::load($a, $this->parameters['nickname']);
|
||||
$profile = ProfileModel::load($this->appHelper, $this->parameters['nickname']);
|
||||
if (empty($profile)) {
|
||||
throw new HTTPException\NotFoundException(DI::l10n()->t('User not found.'));
|
||||
}
|
||||
|
|
|
@ -42,8 +42,6 @@ class Schedule extends BaseProfile
|
|||
throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
|
||||
}
|
||||
|
||||
$a = DI::app();
|
||||
|
||||
$o = self::getTabsHTML('schedule', true, DI::userSession()->getLocalUserNickname(), false);
|
||||
|
||||
$schedule = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue