mirror of
https://github.com/friendica/friendica
synced 2025-04-21 02:30:11 +00:00
Switch static::$parameters
to $this->parameters
This commit is contained in:
parent
489cd0884a
commit
5879535822
116 changed files with 321 additions and 314 deletions
|
@ -34,7 +34,7 @@ class Details extends BaseAdmin
|
|||
{
|
||||
self::checkAdminAccess();
|
||||
|
||||
$addon = Strings::sanitizeFilePathItem(static::$parameters['addon']);
|
||||
$addon = Strings::sanitizeFilePathItem($this->parameters['addon']);
|
||||
|
||||
$redirect = 'admin/addons/' . $addon;
|
||||
|
||||
|
@ -60,7 +60,7 @@ class Details extends BaseAdmin
|
|||
|
||||
$addons_admin = Addon::getAdminList();
|
||||
|
||||
$addon = Strings::sanitizeFilePathItem(static::$parameters['addon']);
|
||||
$addon = Strings::sanitizeFilePathItem($this->parameters['addon']);
|
||||
if (!is_file("addon/$addon/$addon.php")) {
|
||||
notice(DI::l10n()->t('Addon not found.'));
|
||||
Addon::uninstall($addon);
|
||||
|
|
|
@ -36,8 +36,8 @@ class DBSync extends BaseAdmin
|
|||
|
||||
$a = DI::app();
|
||||
|
||||
$action = static::$parameters['action'] ?? '';
|
||||
$update = static::$parameters['update'] ?? 0;
|
||||
$action = $this->parameters['action'] ?? '';
|
||||
$update = $this->parameters['update'] ?? 0;
|
||||
|
||||
switch ($action) {
|
||||
case 'mark':
|
||||
|
|
|
@ -33,7 +33,7 @@ class Source extends BaseAdmin
|
|||
{
|
||||
parent::content();
|
||||
|
||||
$guid = basename($_REQUEST['guid'] ?? static::$parameters['guid'] ?? '');
|
||||
$guid = basename($_REQUEST['guid'] ?? $this->parameters['guid'] ?? '');
|
||||
|
||||
$source = '';
|
||||
$item_uri = '';
|
||||
|
|
|
@ -42,7 +42,7 @@ class Queue extends BaseAdmin
|
|||
{
|
||||
parent::content();
|
||||
|
||||
$status = static::$parameters['status'] ?? '';
|
||||
$status = $this->parameters['status'] ?? '';
|
||||
|
||||
// get jobs from the workerqueue table
|
||||
if ($status == 'deferred') {
|
||||
|
|
|
@ -37,7 +37,7 @@ class Storage extends BaseAdmin
|
|||
|
||||
self::checkFormSecurityTokenRedirectOnError('/admin/storage', 'admin_storage');
|
||||
|
||||
$storagebackend = trim(static::$parameters['name'] ?? '');
|
||||
$storagebackend = trim($this->parameters['name'] ?? '');
|
||||
|
||||
try {
|
||||
/** @var ICanConfigureStorage|false $newStorageConfig */
|
||||
|
|
|
@ -34,7 +34,7 @@ class Details extends BaseAdmin
|
|||
{
|
||||
parent::content();
|
||||
|
||||
$theme = Strings::sanitizeFilePathItem(static::$parameters['theme']);
|
||||
$theme = Strings::sanitizeFilePathItem($this->parameters['theme']);
|
||||
if (!is_dir("view/theme/$theme")) {
|
||||
notice(DI::l10n()->t("Item not found."));
|
||||
return '';
|
||||
|
|
|
@ -30,7 +30,7 @@ class Embed extends BaseAdmin
|
|||
{
|
||||
public function init()
|
||||
{
|
||||
$theme = Strings::sanitizeFilePathItem(static::$parameters['theme']);
|
||||
$theme = Strings::sanitizeFilePathItem($this->parameters['theme']);
|
||||
if (is_file("view/theme/$theme/config.php")) {
|
||||
DI::app()->setCurrentTheme($theme);
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ class Embed extends BaseAdmin
|
|||
{
|
||||
self::checkAdminAccess();
|
||||
|
||||
$theme = Strings::sanitizeFilePathItem(static::$parameters['theme']);
|
||||
$theme = Strings::sanitizeFilePathItem($this->parameters['theme']);
|
||||
if (is_file("view/theme/$theme/config.php")) {
|
||||
require_once "view/theme/$theme/config.php";
|
||||
if (function_exists('theme_admin_post')) {
|
||||
|
@ -60,7 +60,7 @@ class Embed extends BaseAdmin
|
|||
{
|
||||
parent::content();
|
||||
|
||||
$theme = Strings::sanitizeFilePathItem(static::$parameters['theme']);
|
||||
$theme = Strings::sanitizeFilePathItem($this->parameters['theme']);
|
||||
if (!is_dir("view/theme/$theme")) {
|
||||
notice(DI::l10n()->t('Unknown theme.'));
|
||||
return '';
|
||||
|
|
|
@ -52,7 +52,7 @@ class Tos extends BaseAdmin
|
|||
{
|
||||
parent::content();
|
||||
|
||||
$tos = new \Friendica\Module\Tos(static::$parameters);
|
||||
$tos = new \Friendica\Module\Tos($this->parameters);
|
||||
$t = Renderer::getMarkupTemplate('admin/tos.tpl');
|
||||
return Renderer::replaceMacros($t, [
|
||||
'$title' => DI::l10n()->t('Administration'),
|
||||
|
|
|
@ -64,8 +64,8 @@ class Active extends BaseUsers
|
|||
{
|
||||
parent::content();
|
||||
|
||||
$action = static::$parameters['action'] ?? '';
|
||||
$uid = static::$parameters['uid'] ?? 0;
|
||||
$action = $this->parameters['action'] ?? '';
|
||||
$uid = $this->parameters['uid'] ?? 0;
|
||||
|
||||
if ($uid) {
|
||||
$user = User::getById($uid, ['username', 'blocked']);
|
||||
|
|
|
@ -65,8 +65,8 @@ class Blocked extends BaseUsers
|
|||
{
|
||||
parent::content();
|
||||
|
||||
$action = static::$parameters['action'] ?? '';
|
||||
$uid = static::$parameters['uid'] ?? 0;
|
||||
$action = $this->parameters['action'] ?? '';
|
||||
$uid = $this->parameters['uid'] ?? 0;
|
||||
|
||||
if ($uid) {
|
||||
$user = User::getById($uid, ['username', 'blocked']);
|
||||
|
|
|
@ -71,8 +71,8 @@ class Index extends BaseUsers
|
|||
{
|
||||
parent::content();
|
||||
|
||||
$action = static::$parameters['action'] ?? '';
|
||||
$uid = static::$parameters['uid'] ?? 0;
|
||||
$action = $this->parameters['action'] ?? '';
|
||||
$uid = $this->parameters['uid'] ?? 0;
|
||||
|
||||
if ($uid) {
|
||||
$user = User::getById($uid, ['username', 'blocked']);
|
||||
|
|
|
@ -62,8 +62,8 @@ class Pending extends BaseUsers
|
|||
{
|
||||
parent::content();
|
||||
|
||||
$action = static::$parameters['action'] ?? '';
|
||||
$uid = static::$parameters['uid'] ?? 0;
|
||||
$action = $this->parameters['action'] ?? '';
|
||||
$uid = $this->parameters['uid'] ?? 0;
|
||||
|
||||
if ($uid) {
|
||||
$user = User::getById($uid, ['username', 'blocked']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue