]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/BaseAdmin.php
Merge pull request #11503 from annando/bulk-delivery
[friendica.git] / src / Module / BaseAdmin.php
index e49059bbad5dffdd5c3f096b470651d1d735c4d7..0535996301a4232659f72b6afcbf079105198ea9 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -59,16 +59,16 @@ abstract class BaseAdmin extends BaseModule
                        }
                }
 
-               if (!is_site_admin()) {
+               if (!DI::app()->isSiteAdmin()) {
                        throw new HTTPException\ForbiddenException(DI::l10n()->t('You don\'t have access to administration pages.'));
                }
 
                if (!empty($_SESSION['submanage'])) {
-                       throw new HTTPException\ForbiddenException(DI::l10n()->t('Submanaged account can\'t access the administation pages. Please log back in as the main account.'));
+                       throw new HTTPException\ForbiddenException(DI::l10n()->t('Submanaged account can\'t access the administration pages. Please log back in as the main account.'));
                }
        }
 
-       public static function content(array $parameters = [])
+       protected function content(array $request = []): string
        {
                self::checkAdminAccess(true);
 
@@ -88,6 +88,7 @@ abstract class BaseAdmin extends BaseModule
                        ]],
                        'configuration' => [DI::l10n()->t('Configuration'), [
                                'site'         => ['admin/site'        , DI::l10n()->t('Site')                    , 'site'],
+                               'storage'      => ['admin/storage'     , DI::l10n()->t('Storage')                 , 'storage'],
                                'users'        => ['admin/users'       , DI::l10n()->t('Users')                   , 'users'],
                                'addons'       => ['admin/addons'      , DI::l10n()->t('Addons')                  , 'addons'],
                                'themes'       => ['admin/themes'      , DI::l10n()->t('Themes')                  , 'themes'],