]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/BaseApi.php
Prevent settings/userexport to be used by anonymous users
[friendica.git] / src / Module / BaseApi.php
index 5a5326756dcb17b47badbccf3b06b85fe9845551..d62014afc40a02ce098d4adb9d1c3dea56f1048c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -42,13 +42,13 @@ class BaseApi extends BaseModule
        {
                $arguments = DI::args();
 
-               if (substr($arguments->getQueryString(), -4) === '.xml') {
+               if (substr($arguments->getCommand(), -4) === '.xml') {
                        self::$format = 'xml';
                }
-               if (substr($arguments->getQueryString(), -4) === '.rss') {
+               if (substr($arguments->getCommand(), -4) === '.rss') {
                        self::$format = 'rss';
                }
-               if (substr($arguments->getQueryString(), -4) === '.atom') {
+               if (substr($arguments->getCommand(), -4) === '.atom') {
                        self::$format = 'atom';
                }
        }