]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Settings/Delegation.php
Issue 11870: Weeks can now start at every day
[friendica.git] / src / Module / Settings / Delegation.php
index e590d6ea773243bd5366634edc373cdeac86d07d..75e683e60a179b3190538f154a4d7075427357eb 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
  *
@@ -36,9 +36,9 @@ use Friendica\Util\Strings;
  */
 class Delegation extends BaseSettings
 {
-       public static function post(array $parameters = [])
+       protected function post(array $request = [])
        {
-               if (!local_user() || !empty(DI::app()->user['uid']) && DI::app()->user['uid'] != local_user()) {
+               if (!DI::app()->isLoggedIn()) {
                        throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
                }
 
@@ -62,9 +62,9 @@ class Delegation extends BaseSettings
                DBA::update('user', ['parent-uid' => $parent_uid], ['uid' => local_user()]);
        }
 
-       public static function content(array $parameters = [])
+       protected function content(array $request = []): string
        {
-               parent::content($parameters);
+               parent::content();
 
                if (!local_user()) {
                        throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));