mirror of
https://github.com/friendica/friendica
synced 2025-04-26 11:10:11 +00:00
Replace deprecated defaults() calls by ?? and ?: operators in src/Module/
This commit is contained in:
parent
8998926e5b
commit
f59ea2af55
40 changed files with 115 additions and 94 deletions
|
@ -53,7 +53,7 @@ class Details extends BaseAdminModule
|
|||
$a->internalRedirect('admin/addons');
|
||||
}
|
||||
|
||||
if (defaults($_GET, 'action', '') == 'toggle') {
|
||||
if (($_GET['action'] ?? '') == 'toggle') {
|
||||
parent::checkFormSecurityTokenRedirectOnError('/admin/addons', 'admin_themes', 't');
|
||||
|
||||
// Toggle addon status
|
||||
|
|
|
@ -26,7 +26,7 @@ class Index extends BaseAdminModule
|
|||
break;
|
||||
|
||||
case 'toggle' :
|
||||
$addon = defaults($_GET, 'addon', '');
|
||||
$addon = $_GET['addon'] ?? '';
|
||||
if (Addon::isEnabled($addon)) {
|
||||
Addon::uninstall($addon);
|
||||
info(L10n::t('Addon %s disabled.', $addon));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue