]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Admin/Tos.php
Issue-9358 (now for real) commenting and updating on contact now work
[friendica.git] / src / Module / Admin / Tos.php
index a3bc94a1fe5094403681259de077b0cbbea5b056..5ad3a72ddc0d277c1aaf4b6985adb52b9e62d4c3 100644 (file)
@@ -29,14 +29,14 @@ class Tos extends BaseAdmin
 {
        public static function post(array $parameters = [])
        {
-               parent::post($parameters);
-
-               parent::checkFormSecurityTokenRedirectOnError('/admin/tos', 'admin_tos');
+               self::checkAdminAccess();
 
                if (empty($_POST['page_tos'])) {
                        return;
                }
 
+               self::checkFormSecurityTokenRedirectOnError('/admin/tos', 'admin_tos');
+
                $displaytos = !empty($_POST['displaytos']);
                $displayprivstatement = !empty($_POST['displayprivstatement']);
                $tostext = (!empty($_POST['tostext']) ? strip_tags(trim($_POST['tostext'])) : '');
@@ -62,7 +62,7 @@ class Tos extends BaseAdmin
                        '$preview' => DI::l10n()->t('Privacy Statement Preview'),
                        '$privtext' => $tos->privacy_complete,
                        '$tostext' => ['tostext', DI::l10n()->t('The Terms of Service'), DI::config()->get('system', 'tostext'), DI::l10n()->t('Enter the Terms of Service for your node here. You can use BBCode. Headers of sections should be [h2] and below.')],
-                       '$form_security_token' => parent::getFormSecurityToken('admin_tos'),
+                       '$form_security_token' => self::getFormSecurityToken('admin_tos'),
                        '$submit' => DI::l10n()->t('Save Settings'),
                ]);
        }