]> git.mxchange.org Git - friendica.git/blobdiff - mod/delegate.php
Renamed System::redirect() to $a->redirect()
[friendica.git] / mod / delegate.php
index f711f593fabbbf1690c43c253372f4b16e7865be..e525e1ab80d76a402356f96c582fa3de0292835d 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 use Friendica\App;
+use Friendica\BaseModule;
 use Friendica\Core\L10n;
 use Friendica\Core\Protocol;
 use Friendica\Core\System;
@@ -29,7 +30,7 @@ function delegate_post(App $a)
                return;
        }
 
-       Security::check_form_security_token_redirectOnErr('/delegate', 'delegate');
+       BaseModule::checkFormSecurityTokenRedirectOnError('/delegate', 'delegate');
 
        $parent_uid = defaults($_POST, 'parent_user', 0);
        $parent_password = defaults($_POST, 'parent_password', '');
@@ -61,7 +62,7 @@ function delegate_content(App $a)
        if ($a->argc > 2 && $a->argv[1] === 'add' && intval($a->argv[2])) {
                // delegated admins can view but not change delegation permissions
                if (x($_SESSION, 'submanage')) {
-                       goaway(System::baseUrl() . '/delegate');
+                       $a->redirect('delegate');
                }
 
                $user_id = $a->argv[2];
@@ -76,17 +77,17 @@ function delegate_content(App $a)
                                DBA::insert('manage', ['uid' => $user_id, 'mid' => local_user()]);
                        }
                }
-               goaway(System::baseUrl() . '/delegate');
+               $a->redirect('delegate');
        }
 
        if ($a->argc > 2 && $a->argv[1] === 'remove' && intval($a->argv[2])) {
                // delegated admins can view but not change delegation permissions
                if (x($_SESSION, 'submanage')) {
-                       goaway(System::baseUrl() . '/delegate');
+                       $a->redirect('delegate');
                }
 
                DBA::delete('manage', ['uid' => $a->argv[2], 'mid' => local_user()]);
-               goaway(System::baseUrl() . '/delegate');
+               $a->redirect('delegate');
        }
 
        // find everybody that currently has delegated management to this account/page
@@ -163,7 +164,7 @@ function delegate_content(App $a)
        }
 
        $o = replace_macros(get_markup_template('delegate.tpl'), [
-               '$form_security_token' => Security::get_form_security_token('delegate'),
+               '$form_security_token' => BaseModule::getFormSecurityToken('delegate'),
                '$parent_header' => L10n::t('Parent User'),
                '$parent_user' => $parent_user,
                '$parent_password' => $parent_password,