]> git.mxchange.org Git - friendica.git/commitdiff
Make BaseModule methods dynamic
authorPhilipp <admin@philipp.info>
Sun, 14 Nov 2021 22:13:47 +0000 (23:13 +0100)
committerPhilipp <admin@philipp.info>
Sun, 14 Nov 2021 22:49:06 +0000 (23:49 +0100)
253 files changed:
mod/display.php
mod/unfollow.php
src/App/Module.php
src/App/Page.php
src/BaseModule.php
src/Capabilities/ICanHandleRequests.php
src/LegacyModule.php
src/Module/AccountManagementControlDocument.php
src/Module/Acctlink.php
src/Module/ActivityPub/Followers.php
src/Module/ActivityPub/Following.php
src/Module/ActivityPub/Inbox.php
src/Module/ActivityPub/Objects.php
src/Module/ActivityPub/Outbox.php
src/Module/Admin/Addons/Details.php
src/Module/Admin/Addons/Index.php
src/Module/Admin/Blocklist/Contact.php
src/Module/Admin/Blocklist/Server/Add.php
src/Module/Admin/Blocklist/Server/Index.php
src/Module/Admin/DBSync.php
src/Module/Admin/Features.php
src/Module/Admin/Federation.php
src/Module/Admin/Item/Delete.php
src/Module/Admin/Item/Source.php
src/Module/Admin/Logs/Settings.php
src/Module/Admin/Logs/View.php
src/Module/Admin/PhpInfo.php
src/Module/Admin/Queue.php
src/Module/Admin/Site.php
src/Module/Admin/Storage.php
src/Module/Admin/Summary.php
src/Module/Admin/Themes/Details.php
src/Module/Admin/Themes/Embed.php
src/Module/Admin/Themes/Index.php
src/Module/Admin/Tos.php
src/Module/Admin/Users/Active.php
src/Module/Admin/Users/Blocked.php
src/Module/Admin/Users/Create.php
src/Module/Admin/Users/Deleted.php
src/Module/Admin/Users/Index.php
src/Module/Admin/Users/Pending.php
src/Module/Api/Friendica/Activity.php
src/Module/Api/Friendica/DirectMessages/Setseen.php
src/Module/Api/Friendica/Events/Index.php
src/Module/Api/Friendica/Index.php
src/Module/Api/Friendica/Notification.php
src/Module/Api/Friendica/Photo/Delete.php
src/Module/Api/Friendica/Photoalbum/Delete.php
src/Module/Api/Friendica/Photoalbum/Update.php
src/Module/Api/Friendica/Profile/Show.php
src/Module/Api/GNUSocial/GNUSocial/Version.php
src/Module/Api/GNUSocial/Help/Test.php
src/Module/Api/Mastodon/Accounts.php
src/Module/Api/Mastodon/Accounts/Block.php
src/Module/Api/Mastodon/Accounts/FeaturedTags.php
src/Module/Api/Mastodon/Accounts/Follow.php
src/Module/Api/Mastodon/Accounts/Followers.php
src/Module/Api/Mastodon/Accounts/Following.php
src/Module/Api/Mastodon/Accounts/IdentityProofs.php
src/Module/Api/Mastodon/Accounts/Lists.php
src/Module/Api/Mastodon/Accounts/Mute.php
src/Module/Api/Mastodon/Accounts/Note.php
src/Module/Api/Mastodon/Accounts/Relationships.php
src/Module/Api/Mastodon/Accounts/Search.php
src/Module/Api/Mastodon/Accounts/Statuses.php
src/Module/Api/Mastodon/Accounts/Unblock.php
src/Module/Api/Mastodon/Accounts/Unfollow.php
src/Module/Api/Mastodon/Accounts/Unmute.php
src/Module/Api/Mastodon/Accounts/UpdateCredentials.php
src/Module/Api/Mastodon/Accounts/VerifyCredentials.php
src/Module/Api/Mastodon/Announcements.php
src/Module/Api/Mastodon/Apps.php
src/Module/Api/Mastodon/Apps/VerifyCredentials.php
src/Module/Api/Mastodon/Blocks.php
src/Module/Api/Mastodon/Bookmarks.php
src/Module/Api/Mastodon/Conversations.php
src/Module/Api/Mastodon/Conversations/Read.php
src/Module/Api/Mastodon/CustomEmojis.php
src/Module/Api/Mastodon/Directory.php
src/Module/Api/Mastodon/Endorsements.php
src/Module/Api/Mastodon/Favourited.php
src/Module/Api/Mastodon/Filters.php
src/Module/Api/Mastodon/FollowRequests.php
src/Module/Api/Mastodon/Instance.php
src/Module/Api/Mastodon/Instance/Peers.php
src/Module/Api/Mastodon/Instance/Rules.php
src/Module/Api/Mastodon/Lists.php
src/Module/Api/Mastodon/Lists/Accounts.php
src/Module/Api/Mastodon/Markers.php
src/Module/Api/Mastodon/Media.php
src/Module/Api/Mastodon/Mutes.php
src/Module/Api/Mastodon/Notifications.php
src/Module/Api/Mastodon/Notifications/Clear.php
src/Module/Api/Mastodon/Notifications/Dismiss.php
src/Module/Api/Mastodon/Preferences.php
src/Module/Api/Mastodon/Proofs.php
src/Module/Api/Mastodon/PushSubscription.php
src/Module/Api/Mastodon/ScheduledStatuses.php
src/Module/Api/Mastodon/Search.php
src/Module/Api/Mastodon/Statuses.php
src/Module/Api/Mastodon/Statuses/Bookmark.php
src/Module/Api/Mastodon/Statuses/Card.php
src/Module/Api/Mastodon/Statuses/Context.php
src/Module/Api/Mastodon/Statuses/Favourite.php
src/Module/Api/Mastodon/Statuses/FavouritedBy.php
src/Module/Api/Mastodon/Statuses/Mute.php
src/Module/Api/Mastodon/Statuses/Pin.php
src/Module/Api/Mastodon/Statuses/Reblog.php
src/Module/Api/Mastodon/Statuses/RebloggedBy.php
src/Module/Api/Mastodon/Statuses/Unbookmark.php
src/Module/Api/Mastodon/Statuses/Unfavourite.php
src/Module/Api/Mastodon/Statuses/Unmute.php
src/Module/Api/Mastodon/Statuses/Unpin.php
src/Module/Api/Mastodon/Statuses/Unreblog.php
src/Module/Api/Mastodon/Suggestions.php
src/Module/Api/Mastodon/Timelines/Direct.php
src/Module/Api/Mastodon/Timelines/Home.php
src/Module/Api/Mastodon/Timelines/ListTimeline.php
src/Module/Api/Mastodon/Timelines/PublicTimeline.php
src/Module/Api/Mastodon/Timelines/Tag.php
src/Module/Api/Mastodon/Trends.php
src/Module/Api/Mastodon/Unimplemented.php
src/Module/Api/Twitter/Account/RateLimitStatus.php
src/Module/Api/Twitter/ContactEndpoint.php
src/Module/Api/Twitter/FollowersIds.php
src/Module/Api/Twitter/FollowersList.php
src/Module/Api/Twitter/FriendsIds.php
src/Module/Api/Twitter/FriendsList.php
src/Module/Api/Twitter/SavedSearches.php
src/Module/Apps.php
src/Module/Attach.php
src/Module/BaseAdmin.php
src/Module/BaseApi.php
src/Module/BaseNotifications.php
src/Module/BaseSettings.php
src/Module/Bookmarklet.php
src/Module/Contact.php
src/Module/Contact/Advanced.php
src/Module/Contact/Contacts.php
src/Module/Contact/Hovercard.php
src/Module/Contact/Media.php
src/Module/Contact/Poke.php
src/Module/Contact/Revoke.php
src/Module/Conversation/Community.php
src/Module/Conversation/Network.php
src/Module/Credits.php
src/Module/DFRN/Notify.php
src/Module/DFRN/Poll.php
src/Module/Debug/ActivityPubConversion.php
src/Module/Debug/Babel.php
src/Module/Debug/Feed.php
src/Module/Debug/ItemBody.php
src/Module/Debug/Localtime.php
src/Module/Debug/Probe.php
src/Module/Debug/WebFinger.php
src/Module/Delegation.php
src/Module/Diaspora/Fetch.php
src/Module/Diaspora/Receive.php
src/Module/Directory.php
src/Module/Events/Json.php
src/Module/Feed.php
src/Module/Filer/RemoveTag.php
src/Module/Filer/SaveTag.php
src/Module/FollowConfirm.php
src/Module/FriendSuggest.php
src/Module/Friendica.php
src/Module/Group.php
src/Module/HCard.php
src/Module/HTTPException/MethodNotAllowed.php
src/Module/HTTPException/PageNotFound.php
src/Module/Hashtag.php
src/Module/Help.php
src/Module/Home.php
src/Module/Install.php
src/Module/Invite.php
src/Module/Item/Activity.php
src/Module/Item/Compose.php
src/Module/Item/Follow.php
src/Module/Item/Ignore.php
src/Module/Item/Pin.php
src/Module/Item/Star.php
src/Module/Magic.php
src/Module/Maintenance.php
src/Module/Manifest.php
src/Module/NoScrape.php
src/Module/NodeInfo110.php
src/Module/NodeInfo120.php
src/Module/NodeInfo210.php
src/Module/Notifications/Introductions.php
src/Module/Notifications/Notification.php
src/Module/Notifications/Notifications.php
src/Module/OAuth/Acknowledge.php
src/Module/OAuth/Authorize.php
src/Module/OAuth/Revoke.php
src/Module/OAuth/Token.php
src/Module/Oembed.php
src/Module/OpenSearch.php
src/Module/Owa.php
src/Module/ParseUrl.php
src/Module/PermissionTooltip.php
src/Module/Photo.php
src/Module/Profile/Common.php
src/Module/Profile/Contacts.php
src/Module/Profile/Index.php
src/Module/Profile/Media.php
src/Module/Profile/Profile.php
src/Module/Profile/Schedule.php
src/Module/Profile/Status.php
src/Module/Proxy.php
src/Module/PublicRSAKey.php
src/Module/RandomProfile.php
src/Module/ReallySimpleDiscovery.php
src/Module/Register.php
src/Module/RemoteFollow.php
src/Module/RobotsTxt.php
src/Module/Search/Acl.php
src/Module/Search/Directory.php
src/Module/Search/Filed.php
src/Module/Search/Index.php
src/Module/Search/Saved.php
src/Module/Security/Login.php
src/Module/Security/Logout.php
src/Module/Security/OpenID.php
src/Module/Security/TwoFactor/Recovery.php
src/Module/Security/TwoFactor/Verify.php
src/Module/Settings/Delegation.php
src/Module/Settings/Display.php
src/Module/Settings/Profile/Index.php
src/Module/Settings/Profile/Photo/Crop.php
src/Module/Settings/Profile/Photo/Index.php
src/Module/Settings/TwoFactor/AppSpecific.php
src/Module/Settings/TwoFactor/Index.php
src/Module/Settings/TwoFactor/Recovery.php
src/Module/Settings/TwoFactor/Trusted.php
src/Module/Settings/TwoFactor/Verify.php
src/Module/Settings/UserExport.php
src/Module/Smilies.php
src/Module/Special/HTTPException.php
src/Module/Statistics.php
src/Module/Theme.php
src/Module/ThemeDetails.php
src/Module/ToggleMobile.php
src/Module/Tos.php
src/Module/Update/Community.php
src/Module/Update/Network.php
src/Module/Update/Profile.php
src/Module/Welcome.php
src/Module/WellKnown/HostMeta.php
src/Module/WellKnown/NodeInfo.php
src/Module/WellKnown/SecurityTxt.php
src/Module/WellKnown/XSocialRelay.php
src/Module/Xrd.php
tests/src/App/ModuleTest.php

index b53dd354381b2266cea49cace30e3e9437db1342..dce2a10ce76b166d304473b04e3af241c013fb4c 100644 (file)
@@ -40,7 +40,7 @@ use Friendica\Protocol\DFRN;
 function display_init(App $a)
 {
        if (ActivityPub::isRequest()) {
-               Objects::rawContent(['guid' => DI::args()->getArgv()[1] ?? null]);
+               (new Objects(['guid' => DI::args()->getArgv()[1] ?? null]))->rawContent();
        }
 
        if (DI::config()->get('system', 'block_public') && !Session::isAuthenticated()) {
index 92bded2faa501b4f1741d26f08596f5d30e9a72c..6337211648c257f99ca38c71807dd905b7da3093 100644 (file)
@@ -122,7 +122,7 @@ function unfollow_process(string $url)
 
        $owner = User::getOwnerDataById($uid);
        if (!$owner) {
-               \Friendica\Module\Security\Logout::init();
+               (new \Friendica\Module\Security\Logout())->init();
                // NOTREACHED
        }
 
index 0f0cfa6562fd044a5a904fd630e79f7f5da79f38..0ed4b53e5740051a2441a90c1c4c1af2d8dafa47 100644 (file)
@@ -297,32 +297,32 @@ class Module
 
                Core\Hook::callAll($this->module . '_mod_init', $placeholder);
 
-               $this->module_class::init();
+               $this->module_class->init();
 
                $profiler->set(microtime(true) - $timestamp, 'init');
 
                if ($server['REQUEST_METHOD'] === Router::DELETE) {
-                       $this->module_class::delete();
+                       $this->module_class->delete();
                }
 
                if ($server['REQUEST_METHOD'] === Router::PATCH) {
-                       $this->module_class::patch();
+                       $this->module_class->patch();
                }
 
                if ($server['REQUEST_METHOD'] === Router::POST) {
                        Core\Hook::callAll($this->module . '_mod_post', $post);
-                       $this->module_class::post();
+                       $this->module_class->post();
                }
 
                if ($server['REQUEST_METHOD'] === Router::PUT) {
-                       $this->module_class::put();
+                       $this->module_class->put();
                }
 
                Core\Hook::callAll($this->module . '_mod_afterpost', $placeholder);
-               $this->module_class::afterpost();
+               $this->module_class->afterpost();
 
                // "rawContent" is especially meant for technical endpoints.
                // This endpoint doesn't need any theme initialization or other comparable stuff.
-               $this->module_class::rawContent();
+               $this->module_class->rawContent();
        }
 }
index c29517b1c7ac0eea50add64290b6792d382801ce..d7e04ea7ce101ab0860922dd9d1c0f0d145f34b3 100644 (file)
@@ -350,13 +350,13 @@ class Page implements ArrayAccess
                        $moduleClass = $module->getClass();
 
                        $arr = ['content' => $content];
-                       Hook::callAll( $moduleClass::getClassName() . '_mod_content', $arr);
+                       Hook::callAll( $moduleClass->getClassName() . '_mod_content', $arr);
                        $content = $arr['content'];
-                       $arr     = ['content' => $moduleClass::content()];
-                       Hook::callAll($moduleClass::getClassName() . '_mod_aftercontent', $arr);
+                       $arr     = ['content' => $moduleClass->content()];
+                       Hook::callAll($moduleClass->getClassName() . '_mod_aftercontent', $arr);
                        $content .= $arr['content'];
                } catch (HTTPException $e) {
-                       $content = ModuleHTTPException::content($e);
+                       $content = (new ModuleHTTPException())->content($e);
                }
 
                // initialise content region
index b9db1953e5a3c6ef1c0550969383c4fb7245b73c..76458c6c681d3c4880894d465ef78ff18c0d4501 100644 (file)
@@ -47,14 +47,14 @@ abstract class BaseModule implements ICanHandleRequests
        /**
         * {@inheritDoc}
         */
-       public static function init()
+       public function init()
        {
        }
 
        /**
         * {@inheritDoc}
         */
-       public static function rawContent()
+       public function rawContent()
        {
                // echo '';
                // exit;
@@ -63,7 +63,7 @@ abstract class BaseModule implements ICanHandleRequests
        /**
         * {@inheritDoc}
         */
-       public static function content()
+       public function content(): string
        {
                return '';
        }
@@ -71,21 +71,21 @@ abstract class BaseModule implements ICanHandleRequests
        /**
         * {@inheritDoc}
         */
-       public static function delete()
+       public function delete()
        {
        }
 
        /**
         * {@inheritDoc}
         */
-       public static function patch()
+       public function patch()
        {
        }
 
        /**
         * {@inheritDoc}
         */
-       public static function post()
+       public function post()
        {
                // DI::baseurl()->redirect('module');
        }
@@ -93,19 +93,19 @@ abstract class BaseModule implements ICanHandleRequests
        /**
         * {@inheritDoc}
         */
-       public static function afterpost()
+       public function afterpost()
        {
        }
 
        /**
         * {@inheritDoc}
         */
-       public static function put()
+       public function put()
        {
        }
 
        /** Gets the name of the current class */
-       public static function getClassName(): string
+       public function getClassName(): string
        {
                return static::class;
        }
index 1d44208775ceedbab405b0aab667474b349e7e56..277340464394bfe7eef860949740db517a99e50f 100644 (file)
@@ -13,7 +13,7 @@ interface ICanHandleRequests
         * Extend this method if you need to do any shared processing before both
         * content() or post()
         */
-       public static function init();
+       public function init();
 
        /**
         * Module GET method to display raw content from technical endpoints
@@ -21,7 +21,7 @@ interface ICanHandleRequests
         * Extend this method if the module is supposed to return communication data,
         * e.g. from protocol implementations.
         */
-       public static function rawContent();
+       public function rawContent();
 
        /**
         * Module GET method to display any content
@@ -29,10 +29,8 @@ interface ICanHandleRequests
         * Extend this method if the module is supposed to return any display
         * through a GET request. It can be an HTML page through templating or a
         * XML feed or a JSON output.
-        *
-        * @return string
         */
-       public static function content();
+       public function content(): string;
 
        /**
         * Module DELETE method to process submitted data
@@ -40,7 +38,7 @@ interface ICanHandleRequests
         * Extend this method if the module is supposed to process DELETE requests.
         * Doesn't display any content
         */
-       public static function delete();
+       public function delete();
 
        /**
         * Module PATCH method to process submitted data
@@ -48,7 +46,7 @@ interface ICanHandleRequests
         * Extend this method if the module is supposed to process PATCH requests.
         * Doesn't display any content
         */
-       public static function patch();
+       public function patch();
 
        /**
         * Module POST method to process submitted data
@@ -56,14 +54,14 @@ interface ICanHandleRequests
         * Extend this method if the module is supposed to process POST requests.
         * Doesn't display any content
         */
-       public static function post();
+       public function post();
 
        /**
         * Called after post()
         *
         * Unknown purpose
         */
-       public static function afterpost();
+       public function afterpost();
 
        /**
         * Module PUT method to process submitted data
@@ -71,7 +69,7 @@ interface ICanHandleRequests
         * Extend this method if the module is supposed to process PUT requests.
         * Doesn't display any content
         */
-       public static function put();
+       public function put();
 
-       public static function getClassName(): string;
+       public function getClassName(): string;
 }
index ac4d5cd2c031888ba23b2bb2847e74c15deaf4b9..e90b004bc4ffd1ff9070774bd1eee3fddc75024d 100644 (file)
@@ -54,22 +54,22 @@ class LegacyModule extends BaseModule
                require_once $file_path;
        }
 
-       public static function init()
+       public function init()
        {
                self::runModuleFunction('init', static::$parameters);
        }
 
-       public static function content()
+       public function content(): string
        {
                return self::runModuleFunction('content', static::$parameters);
        }
 
-       public static function post()
+       public function post()
        {
                self::runModuleFunction('post', static::$parameters);
        }
 
-       public static function afterpost()
+       public function afterpost()
        {
                self::runModuleFunction('afterpost', static::$parameters);
        }
index 8c87343d553aa73636dcb14efc56747781e0801a..8de9e80afb874b6321d65b1a43569c1d7427733c 100644 (file)
@@ -30,7 +30,7 @@ use Friendica\BaseModule;
  */
 class AccountManagementControlDocument extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                $output = [
                        'version' => 1,
index f8184c82f1bc558f59590eb7c4ae9eeaa9a87b97..b14bbf8d705f5eda25bd8113a1580d104bccb5c4 100644 (file)
@@ -30,7 +30,7 @@ use Friendica\Model\Contact;
  */
 class Acctlink extends BaseModule
 {
-       public static function content()
+       public function content(): string
        {
                $addr = trim($_GET['addr'] ?? '');
 
@@ -41,5 +41,7 @@ class Acctlink extends BaseModule
                                exit();
                        }
                }
+
+               return '';
        }
 }
index 8c90b2ac06c4f320dd993bb714bcf8093f53271a..e19e7eacfd533b1f2d541e54c1da81d284a73a8e 100644 (file)
@@ -31,7 +31,7 @@ use Friendica\Protocol\ActivityPub;
  */
 class Followers extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                if (empty(static::$parameters['nickname'])) {
                        throw new \Friendica\Network\HTTPException\NotFoundException();
index 08574b546f73c50fe3a253791392beea741d698e..2fa2d640f732f88405f3e10c4aeac64722536776 100644 (file)
@@ -31,7 +31,7 @@ use Friendica\Protocol\ActivityPub;
  */
 class Following extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                if (empty(static::$parameters['nickname'])) {
                        throw new \Friendica\Network\HTTPException\NotFoundException();
index 3e0ca1856229606f66e3496fe7f4c3cbc27fd9bd..4056a7de3be11f4181acbdf197e4edc9a5fa84ef 100644 (file)
@@ -35,7 +35,7 @@ use Friendica\Util\Network;
  */
 class Inbox extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                $postdata = Network::postdata();
 
index 826bfd10cf87be7af657068c2d494f2e49bcda45..eedcb0bd44252ddffb144e7adfb6d246fc9d790c 100644 (file)
@@ -41,7 +41,7 @@ use Friendica\Util\Strings;
  */
 class Objects extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                if (empty(static::$parameters['guid'])) {
                        throw new HTTPException\BadRequestException();
index a2ae10839d42548cbf5ea2004a8b85e3e61fe30e..55144ce1b0878512bdd5ed326c599a1abb589f09 100644 (file)
@@ -31,7 +31,7 @@ use Friendica\Util\HTTPSignature;
  */
 class Outbox extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                if (empty(static::$parameters['nickname'])) {
                        throw new \Friendica\Network\HTTPException\NotFoundException();
index dbb2a67a07baf7e4b1439a2d9ee28c469e105186..7748926cc869250cc97ac8826c889c290594ae56 100644 (file)
@@ -30,7 +30,7 @@ use Friendica\Util\Strings;
 
 class Details extends BaseAdmin
 {
-       public static function post()
+       public function post()
        {
                self::checkAdminAccess();
 
@@ -52,7 +52,7 @@ class Details extends BaseAdmin
                DI::baseUrl()->redirect($redirect);
        }
 
-       public static function content()
+       public function content(): string
        {
                parent::content();
 
index e018b7c70f6ee411f3e0ae1df19df2394e0657c2..6330ee2cfa5f738b9da27efc7306b6ff3d11ebe2 100644 (file)
@@ -28,7 +28,7 @@ use Friendica\Module\BaseAdmin;
 
 class Index extends BaseAdmin
 {
-       public static function content()
+       public function content(): string
        {
                parent::content();
 
index 33041ee9bbd7be4a03f05e2eec3466d1d91f08ba..a0a5c282f81aec06ec06a2d068897d4a1651a18d 100644 (file)
@@ -32,7 +32,7 @@ use Friendica\Util\Network;
 
 class Contact extends BaseAdmin
 {
-       public static function post()
+       public function post()
        {
                self::checkAdminAccess();
 
@@ -76,7 +76,7 @@ class Contact extends BaseAdmin
                DI::baseUrl()->redirect('admin/blocklist/contact');
        }
 
-       public static function content()
+       public function content(): string
        {
                parent::content();
 
index 56b7400f1526415a4fce1ead98d4b2f98b339ede..47c9016d90a6bdafb6adcb353bdeac50a31484a7 100644 (file)
@@ -32,7 +32,7 @@ use GuzzleHttp\Psr7\Uri;
 
 class Add extends BaseAdmin
 {
-       public static function post()
+       public function post()
        {
                self::checkAdminAccess();
 
@@ -66,7 +66,7 @@ class Add extends BaseAdmin
                DI::baseUrl()->redirect('admin/blocklist/server');
        }
 
-       public static function content()
+       public function content(): string
        {
                parent::content();
 
index e819c9366fa863ebdfba0083ab0d62f5a445b11e..ebd39d36a856453863f2b00ea1100e1035b104e2 100644 (file)
@@ -27,7 +27,7 @@ use Friendica\Module\BaseAdmin;
 
 class Index extends BaseAdmin
 {
-       public static function post()
+       public function post()
        {
                self::checkAdminAccess();
 
@@ -56,7 +56,7 @@ class Index extends BaseAdmin
                DI::baseUrl()->redirect('admin/blocklist/server');
        }
 
-       public static function content()
+       public function content(): string
        {
                parent::content();
 
index ef9df4491145a7867e1770a0228ed0036038e628..90588cfa91411963e8500b631fa0e0a691acbbeb 100644 (file)
@@ -30,7 +30,7 @@ use Friendica\Module\BaseAdmin;
 
 class DBSync extends BaseAdmin
 {
-       public static function content()
+       public function content(): string
        {
                parent::content();
 
index 76bb35f53aa535fa53f8c96375ae3d3b90f68a91..d2c8e2d83af607e0717f9b3858233935473b95db 100644 (file)
@@ -28,7 +28,7 @@ use Friendica\Module\BaseAdmin;
 
 class Features extends BaseAdmin
 {
-       public static function post()
+       public function post()
        {
                self::checkAdminAccess();
 
@@ -60,7 +60,7 @@ class Features extends BaseAdmin
                DI::baseUrl()->redirect('admin/features');
        }
 
-       public static function content()
+       public function content(): string
        {
                parent::content();
 
index 9d0070e2d771504f160ae7d348128c3c9f5985fa..65d0453d933f67e78113408bf2b66ceda3ec7496 100644 (file)
@@ -28,7 +28,7 @@ use Friendica\Module\BaseAdmin;
 
 class Federation extends BaseAdmin
 {
-       public static function content()
+       public function content(): string
        {
                parent::content();
 
index 9380b02e0b0067ba895728e4e02945e4aeb0eb9d..91bb71932e817753cf49c760804cd1db8a273580 100644 (file)
@@ -29,7 +29,7 @@ use Friendica\Util\Strings;
 
 class Delete extends BaseAdmin
 {
-       public static function post()
+       public function post()
        {
                self::checkAdminAccess();
 
@@ -55,7 +55,7 @@ class Delete extends BaseAdmin
                DI::baseUrl()->redirect('admin/item/delete');
        }
 
-       public static function content()
+       public function content(): string
        {
                parent::content();
 
index a6dac1a1a16716586f46fbdcfc695dcc2108de7f..9b81d9e766bcb6587fadfc7591daae466be0ce66 100644 (file)
@@ -29,7 +29,7 @@ use Friendica\Module\BaseAdmin;
 class Source extends BaseAdmin
 
 {
-       public static function content()
+       public function content(): string
        {
                parent::content();
 
index faf74266387ce7c2b903a21fd72950efe65403b9..aaf603f82502d26ae33396caa905d484768f8170 100644 (file)
@@ -29,7 +29,7 @@ use Psr\Log\LogLevel;
 
 class Settings extends BaseAdmin
 {
-       public static function post()
+       public function post()
        {
                self::checkAdminAccess();
 
@@ -56,7 +56,7 @@ class Settings extends BaseAdmin
                DI::baseUrl()->redirect('admin/logs');
        }
 
-       public static function content()
+       public function content(): string
        {
                parent::content();
 
index d1d44c00f567dbbb4703170317d2724f7ec0c153..3e312204b03909c14ca5a74b6cc0853212c5b33a 100644 (file)
@@ -31,7 +31,7 @@ class View extends BaseAdmin
 {
        const LIMIT = 500;
 
-       public static function content()
+       public function content(): string
        {
                parent::content();
 
index 8bf15cb0e4807464f63b435c29e48c6685a42f34..e6cad66c76c911aa5cfbdee712b5f27e8fd808b1 100644 (file)
@@ -25,7 +25,7 @@ use Friendica\Module\BaseAdmin;
 
 class PhpInfo extends BaseAdmin
 {
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAdminAccess();
 
index 69c16c39d2dfcd53ba2d7246a16f91e241bf2334..b3460c9aab38ea6c26604b417d9707450ba2c079 100644 (file)
@@ -38,7 +38,7 @@ use Friendica\Util\DateTimeFormat;
  */
 class Queue extends BaseAdmin
 {
-       public static function content()
+       public function content(): string
        {
                parent::content();
 
index e8d463f809922d5a5ee0e26b571af0a4b51817f0..27623880aeb6f6035d65680d43346df262e036cf 100644 (file)
@@ -43,7 +43,7 @@ require_once __DIR__ . '/../../../boot.php';
 
 class Site extends BaseAdmin
 {
-       public static function post()
+       public function post()
        {
                self::checkAdminAccess();
 
@@ -384,7 +384,7 @@ class Site extends BaseAdmin
                DI::baseUrl()->redirect('admin/site' . $active_panel);
        }
 
-       public static function content()
+       public function content(): string
        {
                parent::content();
 
index 1f598c1a23f8101e69697e06a83196d785ef9231..d0d9c3aa4efd00d926ed1e50dfa58d7972d5b55b 100644 (file)
@@ -31,7 +31,7 @@ use Friendica\Util\Strings;
 
 class Storage extends BaseAdmin
 {
-       public static function post()
+       public function post()
        {
                self::checkAdminAccess();
 
@@ -91,7 +91,7 @@ class Storage extends BaseAdmin
                DI::baseUrl()->redirect('admin/storage');
        }
 
-       public static function content()
+       public function content(): string
        {
                parent::content();
 
index 1eeba4883d7176164664119a6d7778f51cabe7bf..5b2efca1e0e5cdac6972055cae0f97d4546f02cc 100644 (file)
@@ -37,7 +37,7 @@ use Friendica\Util\DateTimeFormat;
 
 class Summary extends BaseAdmin
 {
-       public static function content()
+       public function content(): string
        {
                parent::content();
 
index bd02572684b325047184cc10540fc8ecf3ff3540..b81b76ab32f1942aa7fd215025bf168c031320d3 100644 (file)
@@ -30,7 +30,7 @@ use Friendica\Util\Strings;
 
 class Details extends BaseAdmin
 {
-       public static function content()
+       public function content(): string
        {
                parent::content();
 
index 59855b13b25016e3762f8f7f9a217fb3ed4f6f7f..27793380223629916d79ba74371d0d4cd1a65bff 100644 (file)
@@ -28,7 +28,7 @@ use Friendica\Util\Strings;
 
 class Embed extends BaseAdmin
 {
-       public static function init()
+       public function init()
        {
                $theme = Strings::sanitizeFilePathItem(static::$parameters['theme']);
                if (is_file("view/theme/$theme/config.php")) {
@@ -36,7 +36,7 @@ class Embed extends BaseAdmin
                }
        }
 
-       public static function post()
+       public function post()
        {
                self::checkAdminAccess();
 
@@ -56,7 +56,7 @@ class Embed extends BaseAdmin
                DI::baseUrl()->redirect('admin/themes/' . $theme . '/embed?mode=minimal');
        }
 
-       public static function content()
+       public function content(): string
        {
                parent::content();
 
index 7bd09695ece0284d71d3a10003207fc0dd3673bf..ad4dfef94e3fccd3300830edaefbb912022e4fa5 100644 (file)
@@ -29,7 +29,7 @@ use Friendica\Util\Strings;
 
 class Index extends BaseAdmin
 {
-       public static function content()
+       public function content(): string
        {
                parent::content();
 
index a31b403f97a8f33e2a7bbde13ca89a7201288085..3c0b00debcf655f85c19a1631ac44978bd65c020 100644 (file)
@@ -27,7 +27,7 @@ use Friendica\Module\BaseAdmin;
 
 class Tos extends BaseAdmin
 {
-       public static function post()
+       public function post()
        {
                self::checkAdminAccess();
 
@@ -48,7 +48,7 @@ class Tos extends BaseAdmin
                DI::baseUrl()->redirect('admin/tos');
        }
 
-       public static function content()
+       public function content(): string
        {
                parent::content();
 
index 4882ac4eb5a42b37ae3592124bf70b17849fb8fc..613c897649263cff0b8cda7c0b602846fff56338 100644 (file)
@@ -30,7 +30,7 @@ use Friendica\Module\Admin\BaseUsers;
 
 class Active extends BaseUsers
 {
-       public static function post()
+       public function post()
        {
                self::checkAdminAccess();
 
@@ -60,7 +60,7 @@ class Active extends BaseUsers
                DI::baseUrl()->redirect(DI::args()->getQueryString());
        }
 
-       public static function content()
+       public function content(): string
        {
                parent::content();
 
index 6b80081655a3c98110e0c91b1daf84e399e018d6..9ef6dab87d144ec76d37ddbbd4af393f7036e34c 100644 (file)
@@ -31,7 +31,7 @@ use Friendica\Util\Temporal;
 
 class Blocked extends BaseUsers
 {
-       public static function post()
+       public function post()
        {
                self::checkAdminAccess();
 
@@ -61,7 +61,7 @@ class Blocked extends BaseUsers
                DI::baseUrl()->redirect('admin/users/blocked');
        }
 
-       public static function content()
+       public function content(): string
        {
                parent::content();
 
index b80866603078bc989c649fcdba592c185eef28fb..71ab5b4cb9197f933be16bda8874c6920a76fb68 100644 (file)
@@ -28,7 +28,7 @@ use Friendica\Module\Admin\BaseUsers;
 
 class Create extends BaseUsers
 {
-       public static function post()
+       public function post()
        {
                self::checkAdminAccess();
 
@@ -51,7 +51,7 @@ class Create extends BaseUsers
                DI::baseUrl()->redirect('admin/users/create');
        }
 
-       public static function content()
+       public function content(): string
        {
                parent::content();
 
index 8d71b4792ad36aeef55706fd5b902316fc5653d6..6357b2396330a123ea3b51e52b11fcb92d1ce78c 100644 (file)
@@ -33,7 +33,7 @@ use Friendica\Util\Temporal;
 
 class Deleted extends BaseUsers
 {
-       public static function post()
+       public function post()
        {
                self::checkAdminAccess();
 
@@ -44,7 +44,7 @@ class Deleted extends BaseUsers
                DI::baseUrl()->redirect('admin/users/deleted');
        }
 
-       public static function content()
+       public function content(): string
        {
                parent::content();
 
index 1137b2cf96c2b3410c31ed7fa67d776397240ea8..dff00083b20b35fe1548dca3f9fe3504c493c952 100644 (file)
@@ -30,7 +30,7 @@ use Friendica\Module\Admin\BaseUsers;
 
 class Index extends BaseUsers
 {
-       public static function post()
+       public function post()
        {
                self::checkAdminAccess();
 
@@ -67,7 +67,7 @@ class Index extends BaseUsers
                DI::baseUrl()->redirect(DI::args()->getQueryString());
        }
 
-       public static function content()
+       public function content(): string
        {
                parent::content();
 
index ef7d7b12ef46af3cb943e3f6a3ad0a540d356458..eb90db7b9308faf04af09ee0d3e2a5d77a35f38c 100644 (file)
@@ -33,7 +33,7 @@ use Friendica\Util\Temporal;
 
 class Pending extends BaseUsers
 {
-       public static function post()
+       public function post()
        {
                self::checkAdminAccess();
 
@@ -58,7 +58,7 @@ class Pending extends BaseUsers
                DI::baseUrl()->redirect('admin/users/pending');
        }
 
-       public static function content()
+       public function content(): string
        {
                parent::content();
 
index b80d0585bc567cc3776c2f20d740aa9486ced9f0..5f28297b424a60e3dbc88454517e0438025ee5f4 100644 (file)
@@ -40,7 +40,7 @@ use Friendica\Module\BaseApi;
  */
 class Activity extends BaseApi
 {
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
                $uid = self::getCurrentUserID();
index dfffe3bbf010ada7c27fda160f165fa83c6bfa65..944376aad48aa73bad328066711c81aa583fdeba 100644 (file)
@@ -30,7 +30,7 @@ use Friendica\Module\BaseApi;
  */
 class Setseen extends BaseApi
 {
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
                $uid = self::getCurrentUserID();
index 8a610c9d189242ef63e22e222cbdd20307e1c73a..439e021f36ca4a3e8db31d089fe333e7af732876 100644 (file)
@@ -33,7 +33,7 @@ use Friendica\Module\BaseApi;
  */
 class Index extends BaseApi
 {
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
                $uid = self::getCurrentUserID();
index b028d8bb6f5bc8faa4f48afbe8c2adc763301f41..dbe45f545fdd06c040397f62c609154437310dec 100644 (file)
@@ -31,17 +31,17 @@ use Friendica\Module\BaseApi;
  */
 class Index extends BaseApi
 {
-       public static function post()
+       public function post()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);             
        }
 
-       public static function delete()
+       public function delete()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
        }
 
-       public static function rawContent()
+       public function rawContent()
        {
                echo api_call(DI::app());
                exit();
index 6dc4f7831931d2fd9bf7f4f5aa4d90eec727af7b..3057c8cb777c2f87601ed243857c1d2894591d8f 100644 (file)
@@ -31,7 +31,7 @@ use Friendica\Object\Api\Friendica\Notification as ApiNotification;
  */
 class Notification extends BaseApi
 {
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
                $uid = self::getCurrentUserID();
index 4eb8e0dcc508233c1b7564a22cdbb18cbfa1ce3d..d98296625813f1ebcbdc48cce80db8baadcf473a 100644 (file)
@@ -33,7 +33,7 @@ use Friendica\Network\HTTPException\InternalServerErrorException;
  */
 class Delete extends BaseApi
 {
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
                $uid = self::getCurrentUserID();
index f6dc85fcea662fb28425b40b567c3459188afa36..01d05f44b0967c226ec7ce2cc4a9a03af0c020c5 100644 (file)
@@ -34,7 +34,7 @@ use Friendica\Network\HTTPException\InternalServerErrorException;
  */
 class Delete extends BaseApi
 {
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
                $uid = self::getCurrentUserID();
index 311396db375b422c9728f3f4a7aa411f304d4d60..b45f6ced416f005c896b1180d2f1cc75af929821 100644 (file)
@@ -32,7 +32,7 @@ use Friendica\Network\HTTPException\InternalServerErrorException;
  */
 class Update extends BaseApi
 {
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
                $uid = self::getCurrentUserID();
index ae14c8d41a8d9ec66bf1d66d537a00fd6e2ef909..a1280eb7c90e8fdfa207b0cd63b530896272dfea 100644 (file)
@@ -34,7 +34,7 @@ use Friendica\Network\HTTPException;
  */
 class Show extends BaseApi
 {
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
                $uid = self::getCurrentUserID();
index 34fc3c692742cb19bfef4217b707d69c832eaff8..d8ff5c95faf8ee1129d555851a5a3c2321bf50c8 100644 (file)
@@ -29,7 +29,7 @@ use Friendica\DI;
  */
 class Version extends BaseApi
 {
-       public static function rawContent()
+       public function rawContent()
        {
                DI::apiResponse()->exit('version', ['version' => '0.9.7'], static::$parameters['extension'] ?? null);
        }
index 6eedfc1ca9fb9f8cb69ec60f705535bdbd2a1896..d157822862c96d8c7a2bf27f4063587171f813ba 100644 (file)
@@ -29,7 +29,7 @@ use Friendica\DI;
  */
 class Test extends BaseApi
 {
-       public static function rawContent()
+       public function rawContent()
        {
                if (!empty(static::$parameters['extension']) && (static::$parameters['extension'] == 'xml')) {
                        $ok = 'true';
index 360993397ac0aaf9c96f490f99b0a0603fb0345b..13981684f08d9e32d0a2a86749c22e2089d38dbd 100644 (file)
@@ -35,7 +35,7 @@ class Accounts extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                $uid = self::getCurrentUserID();
 
index c32862ca48790b0d2c4d85e17895c2d24ec31f13..522eeb11f59cb788091aa24c0a6c1192d4922d82 100644 (file)
@@ -32,7 +32,7 @@ use Friendica\Module\BaseApi;
  */
 class Block extends BaseApi
 {
-       public static function post()
+       public function post()
        {
                self::checkAllowedScope(self::SCOPE_FOLLOW);
                $uid = self::getCurrentUserID();
index cbb409d1b44fa8d7f208c5b816cc953474667618..fe92696a08d8a7fa810e220d758e131504cd2652 100644 (file)
@@ -32,7 +32,7 @@ class FeaturedTags extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
 
index b02ee18022836a2a4bf62d6b8256f4b84a07aa64..3ed761172402268ab1cf4314f293a340fd0dc454 100644 (file)
@@ -31,7 +31,7 @@ use Friendica\Module\BaseApi;
  */
 class Follow extends BaseApi
 {
-       public static function post()
+       public function post()
        {
                self::checkAllowedScope(self::SCOPE_FOLLOW);
                $uid = self::getCurrentUserID();
index 3d24da2dfa74aed0911887a1d3e8f33b5100c3cb..3270da828caff0f22634c5d527c6e2d70a0d8e58 100644 (file)
@@ -34,7 +34,7 @@ class Followers extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
                $uid = self::getCurrentUserID();
index d3d804704134bb04daf6a68518a54564f581584f..9768d2a039a4b9da196ed700ecf2d6124ab3377d 100644 (file)
@@ -34,7 +34,7 @@ class Following extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
                $uid = self::getCurrentUserID();
index f36d656f5a6e5e8821c052be52d27acc325c7874..88379440abf2c328f2f49130a54127076ecca105 100644 (file)
@@ -32,7 +32,7 @@ class IdentityProofs extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
 
index 3ec24bcc1a72403578950fcdf4f67163d4050a04..4860c4fe53e1da5bf1277f46e6a1d1f87eedc8b6 100644 (file)
@@ -35,7 +35,7 @@ class Lists extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
                $uid = self::getCurrentUserID();
index b0b14a6146a468f3ee8bacfd5533ba4ee6d525d0..159afdfd93b8b426ced3826787b8068d3be2a392 100644 (file)
@@ -31,7 +31,7 @@ use Friendica\Module\BaseApi;
  */
 class Mute extends BaseApi
 {
-       public static function post()
+       public function post()
        {
                self::checkAllowedScope(self::SCOPE_FOLLOW);
                $uid = self::getCurrentUserID();
index ae6e582e8711d72b5fbbb907d8e466840bac6790..d14afbb484d562378a6021d4278c21a6ea1bc58f 100644 (file)
@@ -32,7 +32,7 @@ use Friendica\Module\BaseApi;
  */
 class Note extends BaseApi
 {
-       public static function post()
+       public function post()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
                $uid = self::getCurrentUserID();
index 28135e5eba3772c56e4a446452b33adcc6eba0a6..451b7b49ec2c8dbc7203de17a83a6f7c40840ae0 100644 (file)
@@ -34,7 +34,7 @@ class Relationships extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
                $uid = self::getCurrentUserID();
index 6b9d2d43f9356298e2efbd43fe7889ff3c41fe18..fb3aafaec24d34e31889ae3840143b2fa08606a8 100644 (file)
@@ -37,7 +37,7 @@ class Search extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
                $uid = self::getCurrentUserID();
index c3252d59feac5c013f623f80fdfa198a1fa24fc3..1c95d74c7bb0267ce5797df11df2c002c5c616a8 100644 (file)
@@ -39,7 +39,7 @@ class Statuses extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                $uid = self::getCurrentUserID();
 
index 26a1150424d82c540e90c2d5416300bbbf002fac..aed46c3325400a8c95238092ea531be49c3964d1 100644 (file)
@@ -31,7 +31,7 @@ use Friendica\Module\BaseApi;
  */
 class Unblock extends BaseApi
 {
-       public static function post()
+       public function post()
        {
                self::checkAllowedScope(self::SCOPE_FOLLOW);
                $uid = self::getCurrentUserID();
index cd7aef7ab1640d98f48c8cfd03d1b4ec4e0da6dd..78b6bad62e38bd5c916144f9b81dd060a7e85152 100644 (file)
@@ -31,7 +31,7 @@ use Friendica\Module\BaseApi;
  */
 class Unfollow extends BaseApi
 {
-       public static function post()
+       public function post()
        {
                self::checkAllowedScope(self::SCOPE_FOLLOW);
                $uid = self::getCurrentUserID();
index eb1ad8bfa1d11108466c5977397b846cd030ba84..3e9146f2186f413c7ec8f9d2a866ffb49c51b8ad 100644 (file)
@@ -31,7 +31,7 @@ use Friendica\Module\BaseApi;
  */
 class Unmute extends BaseApi
 {
-       public static function post()
+       public function post()
        {
                self::checkAllowedScope(self::SCOPE_FOLLOW);
                $uid = self::getCurrentUserID();
index 264a2a4a8bcc1b55618a767c389865dfce947b2c..2c55bff43ee2f7122c85db6993daffd0cd1b997f 100644 (file)
@@ -32,7 +32,7 @@ use Friendica\Util\HTTPInputData;
  */
 class UpdateCredentials extends BaseApi
 {
-       public static function patch()
+       public function patch()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
                $uid = self::getCurrentUserID();
index f91545ee10159ad77c10b662514a2bd536e185ed..0cce460375121ea325a1a2cfc31b62d88daeb6e9 100644 (file)
@@ -35,7 +35,7 @@ class VerifyCredentials extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
                $uid = self::getCurrentUserID();
index 23ad0feeb83545ede85a7357599224b8814efb7b..b8d231df6a7fbea4cda7ea9dc849ad33168f4d6e 100644 (file)
@@ -32,7 +32,7 @@ class Announcements extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
 
index adbcd723dad46b802bb13fb85eb5701bd0bb78cc..a00bd40857ee9699e648e53b03c63d2353ae4bdd 100644 (file)
@@ -35,7 +35,7 @@ class Apps extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function post()
+       public function post()
        {
                $request = self::getRequest([
                        'client_name'   => '',
index baa3aa7faa82dab1f4dae94279d3b042ff059ca2..e9720da0f8d143b63082f7966b3d4fa1332788be 100644 (file)
@@ -30,7 +30,7 @@ use Friendica\Module\BaseApi;
  */
 class VerifyCredentials extends BaseApi
 {
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
                $application = self::getCurrentApplication();
index fbcaf2ded371fb97c7fa0dc5ab2a02bde3fdf969..c141b04823bab856fca14975e3330f047e088520 100644 (file)
@@ -34,7 +34,7 @@ class Blocks extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
                $uid = self::getCurrentUserID();
index 6cfa08772223e5f0b2e5eb71f56c6b118b0bc0a6..7b51e4316c8e632faed0388221f4805756007d09 100644 (file)
@@ -36,7 +36,7 @@ class Bookmarks extends BaseApi
        /**
         * @throws HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
                $uid = self::getCurrentUserID();
index af2632ae6349f8606da9aa10ab4216bf5b013bab..fbee5672ef9693584d352806be84749d6ba6341e 100644 (file)
@@ -31,7 +31,7 @@ use Friendica\Module\BaseApi;
  */
 class Conversations extends BaseApi
 {
-       public static function delete()
+       public function delete()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
                $uid = self::getCurrentUserID();
@@ -49,7 +49,7 @@ class Conversations extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
                $uid = self::getCurrentUserID();
index b23a95b5e121d1cc80af54990f2624aeff83f0fd..27f012c01bc562b2f4702a2ff0a24a77d16a7a7d 100644 (file)
@@ -31,7 +31,7 @@ use Friendica\Module\BaseApi;
  */
 class Read extends BaseApi
 {
-       public static function post()
+       public function post()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
                $uid = self::getCurrentUserID();
index a16eedf2f30a5c2484482727b7d5f18adb4b8230..1fedf534825a6828cf433c76743c009c0150cf66 100644 (file)
@@ -37,7 +37,7 @@ class CustomEmojis extends BaseApi
         * @throws \ImagickException
         * @see https://docs.joinmastodon.org/methods/accounts/follow_requests#pending-follows
         */
-       public static function rawContent()
+       public function rawContent()
        {
                $emojis = DI::mstdnEmoji()->createCollectionFromSmilies(Smilies::getList());
 
index ec579d2da5e68ebdf7346d501675e95381ddd7dd..e48a709596efe5c2e9e261c65cdaf7b9b4f2e660 100644 (file)
@@ -39,7 +39,7 @@ class Directory extends BaseApi
         * @throws \ImagickException
         * @see https://docs.joinmastodon.org/methods/instance/directory/
         */
-       public static function rawContent()
+       public function rawContent()
        {
                $request = self::getRequest([
                        'offset' => 0,        // How many accounts to skip before returning results. Default 0.
index 5b90cc48a989251927aabd46c4219dcfd757567a..b9a5bc2cdbef98a95fc4712f8906617ef469e0a8 100644 (file)
@@ -32,7 +32,7 @@ class Endorsements extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                System::jsonExit([]);
        }
index f49d35a7bfc9a76bde7008dfd8b955eb312fa655..48aa452f24cfe185c25c54539adc3652d006bbea 100644 (file)
@@ -37,7 +37,7 @@ class Favourited extends BaseApi
        /**
         * @throws HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
                $uid = self::getCurrentUserID();
index 365ed65f3556a7ee3a02528af7afc325629835c8..5bf50db1ab3578051b5ff0d1bef6aea3537ab9f5 100644 (file)
@@ -31,7 +31,7 @@ use Friendica\Module\BaseApi;
  */
 class Filters extends BaseApi
 {
-       public static function post()
+       public function post()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
 
@@ -41,7 +41,7 @@ class Filters extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
 
index 2fb548b356e3429b0a7ededc91fc4d9f2be3bb38..a334b897a8d47115c6519b0dc39e7da1f9033009 100644 (file)
@@ -42,7 +42,7 @@ class FollowRequests extends BaseApi
         * @see https://docs.joinmastodon.org/methods/accounts/follow_requests#accept-follow
         * @see https://docs.joinmastodon.org/methods/accounts/follow_requests#reject-follow
         */
-       public static function post()
+       public function post()
        {
                self::checkAllowedScope(self::SCOPE_FOLLOW);
                $uid = self::getCurrentUserID();
@@ -82,7 +82,7 @@ class FollowRequests extends BaseApi
         * @throws \ImagickException
         * @see https://docs.joinmastodon.org/methods/accounts/follow_requests/
         */
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
                $uid = self::getCurrentUserID();
index 5f334585349ac3f4ae30afeddd5d006d31b1d40c..b7dc7d700d002ca82a7fbd7427dba91a506fe074 100644 (file)
@@ -33,7 +33,7 @@ class Instance extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                System::jsonExit(InstanceEntity::get());
        }
index 5d4642e0b4ab21f9a7f28da644ebfe3fb079e7df..b1fdd062bd2e9eb0187b3241015b80d19eea7a97 100644 (file)
@@ -36,7 +36,7 @@ class Peers extends BaseApi
        /**
         * @throws HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                $return = [];
 
index bb5822702ab883f1e7c7f90500780fdc541ebed8..3063bf9ead63bab14f82ba9f08139c8be2d753b1 100644 (file)
@@ -36,7 +36,7 @@ class Rules extends BaseApi
        /**
         * @throws HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                $rules = [];
                $id    = 0;
index f977ce10394275ca4d51dc68320e135b382eada1..8a3f7a0ad4a7fe9396abe4c96bc06292b1ea0421 100644 (file)
@@ -31,7 +31,7 @@ use Friendica\Model\Group;
  */
 class Lists extends BaseApi
 {
-       public static function delete()
+       public function delete()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
                $uid = self::getCurrentUserID();
@@ -51,7 +51,7 @@ class Lists extends BaseApi
                System::jsonExit([]);
        }
 
-       public static function post()
+       public function post()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
                $uid = self::getCurrentUserID();
@@ -74,7 +74,7 @@ class Lists extends BaseApi
                System::jsonExit(DI::mstdnList()->createFromGroupId($id));
        }
 
-       public static function put()
+       public function put()
        {
                $request = self::getRequest([
                        'title'          => '', // The title of the list to be updated.
@@ -91,7 +91,7 @@ class Lists extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
                $uid = self::getCurrentUserID();
index 0e008602d4ec7504c9d09778f29a958240c28326..cdc75b6d4994d28cbceb2ef82ae4e21d7c63157c 100644 (file)
@@ -35,12 +35,12 @@ use Friendica\Module\BaseApi;
  */
 class Accounts extends BaseApi
 {
-       public static function delete()
+       public function delete()
        {
                DI::apiResponse()->unsupported(Router::DELETE);
        }
 
-       public static function post()
+       public function post()
        {
                DI::apiResponse()->unsupported(Router::POST);
        }
@@ -48,7 +48,7 @@ class Accounts extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
                $uid = self::getCurrentUserID();
index 5843585e2464dcd092db3db1aad80e27e11c0e96..6a01a30cfab6531496131cc43838e974789fa094 100644 (file)
@@ -31,7 +31,7 @@ use Friendica\Module\BaseApi;
  */
 class Markers extends BaseApi
 {
-       public static function post()
+       public function post()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
 
@@ -41,7 +41,7 @@ class Markers extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
 
index 65aa2813922b5add737f492eaf4731f55ee12c4a..cd858f5eeb9e9cd7ec55befa7bc3efb778818810 100644 (file)
@@ -32,7 +32,7 @@ use Friendica\Module\BaseApi;
  */
 class Media extends BaseApi
 {
-       public static function post()
+       public function post()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
                $uid = self::getCurrentUserID();
@@ -53,7 +53,7 @@ class Media extends BaseApi
                System::jsonExit(DI::mstdnAttachment()->createFromPhoto($media['id']));
        }
 
-       public static function put()
+       public function put()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
                $uid = self::getCurrentUserID();
@@ -82,7 +82,7 @@ class Media extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
                $uid = self::getCurrentUserID();
index da9b75dd9925ab16dd643ef4629ddf98a06418fb..b5ba3fcfd5928618c53b418dc2bac45d9c6820ea 100644 (file)
@@ -34,7 +34,7 @@ class Mutes extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
                $uid = self::getCurrentUserID();
index 3c2e0d4386ac98f7648d643a578ac803f3748c37..c2ddf2a4df6bd7fd14e176411fd9d30654588931 100644 (file)
@@ -40,7 +40,7 @@ class Notifications extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
                $uid = self::getCurrentUserID();
index 93639d8a63442eb7f194af7c3ed5d43b00f06785..4249791579926ee10d82deb89ec7c9f13b0c34b4 100644 (file)
@@ -30,7 +30,7 @@ use Friendica\Module\BaseApi;
  */
 class Clear extends BaseApi
 {
-       public static function post()
+       public function post()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
                $uid = self::getCurrentUserID();
index e3fc3290a118139ed5ebec45f67afe24142e0bc7..b135b5bbf505423385bba0c5f5981e9967eb0092 100644 (file)
@@ -32,7 +32,7 @@ use Friendica\Network\HTTPException\ForbiddenException;
  */
 class Dismiss extends BaseApi
 {
-       public static function post()
+       public function post()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
                $uid = self::getCurrentUserID();
index 21361e1f375b684f0f31613570e1daae52135827..6d846c35bc8cbc2cd16cd30d734a37683181a6ac 100644 (file)
@@ -34,7 +34,7 @@ class Preferences extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
                $uid = self::getCurrentUserID();
index 9bdc77f490f6be5bd169cfabfb8967fc09360f1d..c9b92246a82bc23c3078632d6941078a09623c76 100644 (file)
@@ -32,7 +32,7 @@ class Proofs extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                System::jsonError(404, ['error' => 'Record not found']);
        }
index 715041643903546ab8dd001111175b07e4e01661..e45c943f52bf14c0e0802337890947524ce4a210 100644 (file)
@@ -33,7 +33,7 @@ use Friendica\Object\Api\Mastodon\Notification;
  */
 class PushSubscription extends BaseApi
 {
-       public static function post()
+       public function post()
        {
                self::checkAllowedScope(self::SCOPE_PUSH);
                $uid         = self::getCurrentUserID();
@@ -66,7 +66,7 @@ class PushSubscription extends BaseApi
                return DI::mstdnSubscription()->createForApplicationIdAndUserId($application['id'], $uid)->toArray();
        }
 
-       public static function put()
+       public function put()
        {
                self::checkAllowedScope(self::SCOPE_PUSH);
                $uid         = self::getCurrentUserID();
@@ -99,7 +99,7 @@ class PushSubscription extends BaseApi
                return DI::mstdnSubscription()->createForApplicationIdAndUserId($application['id'], $uid)->toArray();
        }
 
-       public static function delete()
+       public function delete()
        {
                self::checkAllowedScope(self::SCOPE_PUSH);
                $uid         = self::getCurrentUserID();
@@ -112,7 +112,7 @@ class PushSubscription extends BaseApi
                System::jsonExit([]);
        }
 
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_PUSH);
                $uid         = self::getCurrentUserID();
index 6a4971860f3e43d6703f063f95b0e01a1ac25988..b229293819570ad7f474b4b0cba26a474e9a08ae 100644 (file)
@@ -34,7 +34,7 @@ use Friendica\Module\BaseApi;
  */
 class ScheduledStatuses extends BaseApi
 {
-       public static function put()
+       public function put()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
                $uid = self::getCurrentUserID();
@@ -42,7 +42,7 @@ class ScheduledStatuses extends BaseApi
                DI::apiResponse()->unsupported(Router::PUT);
        }
 
-       public static function delete()
+       public function delete()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
                $uid = self::getCurrentUserID();
@@ -63,7 +63,7 @@ class ScheduledStatuses extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
                $uid = self::getCurrentUserID();
index d17db271fdcf6bbd57c520bbeca4b101fb8e8123..dc7c856ac604a9cbc15cb456f0c70bafbf7c3aa1 100644 (file)
@@ -40,7 +40,7 @@ class Search extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
                $uid = self::getCurrentUserID();
index 75e22802e203bd0bb721bde51d927e3be63a55a0..8ffeef07a2f657597c560711707861eb77c819e3 100644 (file)
@@ -41,7 +41,7 @@ use Friendica\Util\Images;
  */
 class Statuses extends BaseApi
 {
-       public static function post()
+       public function post()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
                $uid = self::getCurrentUserID();
@@ -207,7 +207,7 @@ class Statuses extends BaseApi
                DI::mstdnError()->InternalError();
        }
 
-       public static function delete()
+       public function delete()
        {
                self::checkAllowedScope(self::SCOPE_READ);
                $uid = self::getCurrentUserID();
@@ -231,7 +231,7 @@ class Statuses extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                $uid = self::getCurrentUserID();
 
index e12c6ecd2240f8a419fcda0248c4eaecace84bd7..4d2f096cd05482203727fc13a3bbe3679f0f37e0 100644 (file)
@@ -33,7 +33,7 @@ use Friendica\Module\BaseApi;
  */
 class Bookmark extends BaseApi
 {
-       public static function post()
+       public function post()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
                $uid = self::getCurrentUserID();
index 3c8cf706eda82166685f03c9111da6817001b765..698dfab8c5b4d896c1cdcf0d62297daf9c069db1 100644 (file)
@@ -35,7 +35,7 @@ class Card extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                $uid = self::getCurrentUserID();
 
index b8a8007212f1b6a7ac62ac77c261abffdf002ce5..da59bb1d96c5fec6dfe79ebf6de27d8430df0f5b 100644 (file)
@@ -35,7 +35,7 @@ class Context extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                $uid = self::getCurrentUserID();
 
index 00844c544bf9c70d205fb4a688be045ca1e9fa3a..3fe55807b688d959d2b4e3472a0a84003a65767e 100644 (file)
@@ -33,7 +33,7 @@ use Friendica\Module\BaseApi;
  */
 class Favourite extends BaseApi
 {
-       public static function post()
+       public function post()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
                $uid = self::getCurrentUserID();
index 5a1a6116a35e3fbfb93dba6410506a974bd296fc..b6726cc54d0770c219a24a37fdbbb93a5e1ea7d2 100644 (file)
@@ -35,7 +35,7 @@ class FavouritedBy extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                $uid = self::getCurrentUserID();
 
index f9200197f09b46b2247e357f7cef8becaa780437..739126d5819a8af2bff56e0437d2ce057d789709 100644 (file)
@@ -32,7 +32,7 @@ use Friendica\Module\BaseApi;
  */
 class Mute extends BaseApi
 {
-       public static function post()
+       public function post()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
                $uid = self::getCurrentUserID();
index bf6f5bb399e211e638f1a052b69df4031db9eb09..b7573fd9d1d8b607fdce8e8ac68d2ca18eeaba9b 100644 (file)
@@ -32,7 +32,7 @@ use Friendica\Module\BaseApi;
  */
 class Pin extends BaseApi
 {
-       public static function post()
+       public function post()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
                $uid = self::getCurrentUserID();
index 0bba905f76357e8afe91a620dd2524bc389dca85..136491bf26105cf840333d941b8e3866905c174c 100644 (file)
@@ -35,7 +35,7 @@ use Friendica\Module\BaseApi;
  */
 class Reblog extends BaseApi
 {
-       public static function post()
+       public function post()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
                $uid = self::getCurrentUserID();
index 06431969adac8f041757a0a68ec25fff1be49137..de2004b861cf346d61e5253ad42590f9d0618bc9 100644 (file)
@@ -35,7 +35,7 @@ class RebloggedBy extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                $uid = self::getCurrentUserID();
 
index 0ddc5891d8291dbbcd8283374f2d8d9086d7369d..d6bd6fcc8c5e0b7a0f566a885c0be1fddd40eb71 100644 (file)
@@ -33,7 +33,7 @@ use Friendica\Module\BaseApi;
  */
 class Unbookmark extends BaseApi
 {
-       public static function post()
+       public function post()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
                $uid = self::getCurrentUserID();
index 4d6460d444ffdefbb9ff8f0ab671627d581534c5..244b38cd1da1c7cf740cc44969e06ef744e2d785 100644 (file)
@@ -33,7 +33,7 @@ use Friendica\Module\BaseApi;
  */
 class Unfavourite extends BaseApi
 {
-       public static function post()
+       public function post()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
                $uid = self::getCurrentUserID();
index 715462880c58dedac351c5428cb71b60f91930f5..a659b5b079e753d14dbe76de7e4e8652b90a5167 100644 (file)
@@ -32,7 +32,7 @@ use Friendica\Module\BaseApi;
  */
 class Unmute extends BaseApi
 {
-       public static function post()
+       public function post()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
                $uid = self::getCurrentUserID();
index 80afaf701551b8a6ef219a8cce1c324b76b9b7da..1eaf73409a7e63d0be1ab024cda46ea7734e863e 100644 (file)
@@ -32,7 +32,7 @@ use Friendica\Module\BaseApi;
  */
 class Unpin extends BaseApi
 {
-       public static function post()
+       public function post()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
                $uid = self::getCurrentUserID();
index f00d762558ce5a2053fe1da5873c027f66bd5d6d..234d1058f32184811cc12938313221e157043c73 100644 (file)
@@ -35,7 +35,7 @@ use Friendica\Module\BaseApi;
  */
 class Unreblog extends BaseApi
 {
-       public static function post()
+       public function post()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
                $uid = self::getCurrentUserID();
index e7999040baf51f7d67f92eda5dd8623b4939f9b9..b80c239f630419da5337e2ac9ac3d853c40ef4dd 100644 (file)
@@ -34,7 +34,7 @@ class Suggestions extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
                $uid = self::getCurrentUserID();
index 5f8a2e0d74cd212eb1ac7ade62785be69702d6dc..d50c97f47ea61a9251440f5c0ab9716550bdd1cf 100644 (file)
@@ -35,7 +35,7 @@ class Direct extends BaseApi
        /**
         * @throws HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
                $uid = self::getCurrentUserID();
index 7b53171e16ec3c2c376dbc14be2abdcfc1881e96..de21bb2a121cca151cc8f6f9d11e06e1d4e9131b 100644 (file)
@@ -36,7 +36,7 @@ class Home extends BaseApi
        /**
         * @throws HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
                $uid = self::getCurrentUserID();
index 9e3219038855cf029de69fd275859bed4eb8123b..6d58153119543e20f2e18d7e8b7b58fdd03a5dad 100644 (file)
@@ -36,7 +36,7 @@ class ListTimeline extends BaseApi
        /**
         * @throws HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
                $uid = self::getCurrentUserID();
index aa55310a7f453d723956c2c1e8835c231d6f3696..162236d1eaf87e6adbb29f610ae6375d68de2d2d 100644 (file)
@@ -39,7 +39,7 @@ class PublicTimeline extends BaseApi
        /**
         * @throws HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                $uid = self::getCurrentUserID();
 
index 3d87e00948ba686bdfdc8e00e50348295dda6d28..80ccf5a9c22bc750074dee984b6c58e6dd05e3e8 100644 (file)
@@ -37,7 +37,7 @@ class Tag extends BaseApi
        /**
         * @throws HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
                $uid = self::getCurrentUserID();
index c7bfa02891ea834566934e53e55ac364f8de9fbf..3536e737cb6b13a27f245c191a1dffe0fa1ec47d 100644 (file)
@@ -34,7 +34,7 @@ class Trends extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                $request = self::getRequest([
                        'limit' => 20, // Maximum number of results to return. Defaults to 10.
index d346dc7577a5a0f5b48318bcdca57e49650da666..f5f76afd57010daab1cf8a5d7b2c4e2137f4d5b0 100644 (file)
@@ -33,7 +33,7 @@ class Unimplemented extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function delete()
+       public function delete()
        {
                DI::apiResponse()->unsupported(Router::DELETE);
        }
@@ -41,7 +41,7 @@ class Unimplemented extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function patch()
+       public function patch()
        {
                DI::apiResponse()->unsupported(Router::PATCH);
        }
@@ -49,7 +49,7 @@ class Unimplemented extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function post()
+       public function post()
        {
                DI::apiResponse()->unsupported(Router::POST);
        }
@@ -57,7 +57,7 @@ class Unimplemented extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function put()
+       public function put()
        {
                DI::apiResponse()->unsupported(Router::PUT);
        }
@@ -65,7 +65,7 @@ class Unimplemented extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                DI::apiResponse()->unsupported(Router::GET);
        }
index 8dca51c43eb6d557bc20ebc0fff28263831786f8..fa1383b8e03651f8e959504a826e10f8169adfd5 100644 (file)
@@ -30,7 +30,7 @@ use Friendica\Util\DateTimeFormat;
  */
 class RateLimitStatus extends BaseApi
 {
-       public static function rawContent()
+       public function rawContent()
        {
                if (!empty(static::$parameters['extension']) && (static::$parameters['extension'] == 'xml')) {
                        $hash = [
index ddbbfc027ad3a96df570e4443e124ea9ed259831..39e6d2d457768ae94308357f3111cd2703eca9d4 100644 (file)
@@ -35,7 +35,7 @@ abstract class ContactEndpoint extends BaseApi
        const DEFAULT_COUNT = 20;
        const MAX_COUNT = 200;
 
-       public static function init()
+       public function init()
        {
                parent::init();
 
index 0318b5a6864b821681d388d45c305c661a28c4df..f4287dc440abaa061786cd5a080b1db401ea3180 100644 (file)
@@ -29,7 +29,7 @@ use Friendica\Model\Contact;
  */
 class FollowersIds extends ContactEndpoint
 {
-       public static function rawContent()
+       public function rawContent()
        {
                // Expected value for user_id parameter: public/user contact id
                $contact_id    = filter_input(INPUT_GET, 'user_id'      , FILTER_VALIDATE_INT);
index 53e56e88ee1f085a05b5ad048a2e682709a2fe59..72d2bbdcb06590918e9400a978feb147d22cbad3 100644 (file)
@@ -29,7 +29,7 @@ use Friendica\Model\Contact;
  */
 class FollowersList extends ContactEndpoint
 {
-       public static function rawContent()
+       public function rawContent()
        {
                // Expected value for user_id parameter: public/user contact id
                $contact_id    = filter_input(INPUT_GET, 'user_id'      , FILTER_VALIDATE_INT);
index 4df2f7068ed18c08b25ed529e818bdf455d2c891..e3e9a35a38b07c3f1743aee5379103768837f1a7 100644 (file)
@@ -29,7 +29,7 @@ use Friendica\Model\Contact;
  */
 class FriendsIds extends ContactEndpoint
 {
-       public static function rawContent()
+       public function rawContent()
        {
                // Expected value for user_id parameter: public/user contact id
                $contact_id    = filter_input(INPUT_GET, 'user_id'      , FILTER_VALIDATE_INT);
index 59ae03601b491da5b06db65104ffb3f195242f85..764bfd80785159027bb4471080db1c94d616613b 100644 (file)
@@ -29,7 +29,7 @@ use Friendica\Model\Contact;
  */
 class FriendsList extends ContactEndpoint
 {
-       public static function rawContent()
+       public function rawContent()
        {
                // Expected value for user_id parameter: public/user contact id
                $contact_id    = filter_input(INPUT_GET, 'user_id'      , FILTER_VALIDATE_INT);
index d978af807f7e6872bf7634c1866a619658880ba0..8c513a960c5c8d5ce2a5235e9b9fb255a4c14b05 100644 (file)
@@ -31,7 +31,7 @@ use Friendica\Module\BaseApi;
  */
 class SavedSearches extends BaseApi
 {
-       public static function rawContent()
+       public function rawContent()
        {
                self::checkAllowedScope(self::SCOPE_READ);
                $uid = self::getCurrentUserID();
index dc3d1d10d79a8a00c729c077d82ea586aeb1a27b..1d6144f16d9e3c5307b9e78d75223fe15abbf0f7 100644 (file)
@@ -31,7 +31,7 @@ use Friendica\DI;
  */
 class Apps extends BaseModule
 {
-       public static function init()
+       public function init()
        {
                $privateaddons = DI::config()->get('config', 'private_addons');
                if ($privateaddons === "1" && !local_user()) {
@@ -39,7 +39,7 @@ class Apps extends BaseModule
                }
        }
 
-       public static function content()
+       public function content(): string
        {
                $apps = Nav::getAppMenu();
 
index 4f9da85c92d7f754ec2b72b77583f670b2789556..84961ca2763faddb6dd477239e854487747eb0c9 100644 (file)
@@ -34,7 +34,7 @@ class Attach extends BaseModule
        /**
         * Return to user an attached file given the id
         */
-       public static function rawContent()
+       public function rawContent()
        {
                $a = DI::app();
                if (empty(static::$parameters['item'])) {
index 822b6bdf5c67e7d448aaae3a64441464f0a4625c..83e3ca0b17e52150c548b31f214f36de59512673 100644 (file)
@@ -68,7 +68,7 @@ abstract class BaseAdmin extends BaseModule
                }
        }
 
-       public static function content()
+       public function content(): string
        {
                self::checkAdminAccess(true);
 
index b42e9462dc51d6a366584a45ad75af4cd1d46d5f..87a69081420d5639f1ee2f3a9e361de3fd678858 100644 (file)
@@ -53,7 +53,7 @@ class BaseApi extends BaseModule
         */
        protected static $request = [];
 
-       public static function delete()
+       public function delete()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
 
@@ -62,7 +62,7 @@ class BaseApi extends BaseModule
                }
        }
 
-       public static function patch()
+       public function patch()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
 
@@ -71,7 +71,7 @@ class BaseApi extends BaseModule
                }
        }
 
-       public static function post()
+       public function post()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
 
@@ -80,7 +80,7 @@ class BaseApi extends BaseModule
                }
        }
 
-       public static function put()
+       public function put()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
 
index 3987c9056786ee2e314a806d411abda362a3680d..685337699baba572006c2ff671cda659074d104a 100644 (file)
@@ -82,7 +82,7 @@ abstract class BaseNotifications extends BaseModule
         */
        abstract public static function getNotifications();
 
-       public static function init()
+       public function init()
        {
                if (!local_user()) {
                        throw new ForbiddenException(DI::l10n()->t('Permission denied.'));
@@ -94,7 +94,7 @@ abstract class BaseNotifications extends BaseModule
                self::$showAll      = ($_REQUEST['show'] ?? '') === 'all';
        }
 
-       public static function rawContent()
+       public function rawContent()
        {
                // If the last argument of the query is NOT json, return
                if (DI::args()->get(DI::args()->getArgc() - 1) !== 'json') {
index 1a20fc3dc97caf0f9107456c0a07d4d9bdf6f821..7afaa35d0aefeb97658e53e3ba3d3c60dc11af6c 100644 (file)
@@ -28,7 +28,7 @@ use Friendica\DI;
 
 class BaseSettings extends BaseModule
 {
-       public static function content()
+       public function content(): string
        {
                $a = DI::app();
 
@@ -125,5 +125,7 @@ class BaseSettings extends BaseModule
                        '$class' => 'settings-widget',
                        '$items' => $tabs,
                ]);
+
+               return '';
        }
 }
index 408fb50b25eec78226accf43916a6a52a89d28b5..5061254aa1e5e957eef433e6692cbd86f1cb35e4 100644 (file)
@@ -34,7 +34,7 @@ use Friendica\Util\Strings;
  */
 class Bookmarklet extends BaseModule
 {
-       public static function content()
+       public function content(): string
        {
                $_GET['mode'] = 'minimal';
 
index d80abe47026e8075066879cfea40f17173065e1a..243ec4be3e588fb5381ec6cb2953e1b15fe205ea 100644 (file)
@@ -96,7 +96,7 @@ class Contact extends BaseModule
                DI::baseUrl()->redirect($redirectUrl);
        }
 
-       public static function post()
+       public function post()
        {
                if (!local_user()) {
                        return;
@@ -226,7 +226,7 @@ class Contact extends BaseModule
                Model\Contact\User::setIgnored($contact_id, local_user(), $ignored);
        }
 
-       public static function content($update = 0)
+       public function content($update = 0): string
        {
                if (!local_user()) {
                        return Login::form($_SERVER['REQUEST_URI']);
index 521e4f469f841a27e8d7fc801096db4082940973..53ab31d1a66f92851b38feefb0881c455bc3b7d2 100644 (file)
@@ -38,14 +38,14 @@ use Friendica\Util\Strings;
  */
 class Advanced extends BaseModule
 {
-       public static function init()
+       public function init()
        {
                if (!Session::isAuthenticated()) {
                        throw new ForbiddenException(DI::l10n()->t('Permission denied.'));
                }
        }
 
-       public static function post()
+       public function post()
        {
                $cid = static::$parameters['id'];
 
@@ -96,7 +96,7 @@ class Advanced extends BaseModule
                return;
        }
 
-       public static function content()
+       public function content(): string
        {
                $cid = static::$parameters['id'];
 
index 1e3e582c0e55a1355303d0bb0a3d73239cc61f5c..b5b501d6ea68c03e21b1846d02b28082f1394e10 100644 (file)
@@ -14,7 +14,7 @@ use Friendica\Network\HTTPException;
 
 class Contacts extends BaseModule
 {
-       public static function content()
+       public function content(): string
        {
                $app = DI::app();
 
index 2de1a0f8aee52b80223a1bb9bb70ec1082c1843c..34560313d7d571ce0dc2b3f078f0206299603a42 100644 (file)
@@ -35,7 +35,7 @@ use Friendica\Util\Strings;
  */
 class Hovercard extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                $contact_url = $_REQUEST['url'] ?? '';
 
index d854aa9d6385bb2a20c3980c2e90e89f24c55409..d9a03995796d1e76dc7be20c377d71f100c40535 100644 (file)
@@ -34,7 +34,7 @@ use Friendica\Network\HTTPException\BadRequestException;
  */
 class Media extends BaseModule
 {
-       public static function content()
+       public function content(): string
        {
                $cid = static::$parameters['id'];
 
index 7f3e596db7f89d64c4d3739d7cd75314b2896598..215e322580dfd97f1128da885f00bf32357fd5b8 100644 (file)
@@ -18,7 +18,7 @@ use Friendica\Util\XML;
 
 class Poke extends BaseModule
 {
-       public static function post()
+       public function post()
        {
                if (!local_user() || empty(static::$parameters['id'])) {
                        return self::postReturn(false);
@@ -123,7 +123,7 @@ class Poke extends BaseModule
                return $success;
        }
 
-       public static function content()
+       public function content(): string
        {
                if (!local_user()) {
                        throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this module.'));
index 5730d569a35b1f92b2ffd77402b434cf33af599a..1cace6255fa8d7c0b061b019d77882655f1361ab 100644 (file)
@@ -37,7 +37,7 @@ class Revoke extends BaseModule
        /** @var array */
        private static $contact;
 
-       public static function init()
+       public function init()
        {
                if (!local_user()) {
                        return;
@@ -63,7 +63,7 @@ class Revoke extends BaseModule
                }
        }
 
-       public static function post()
+       public function post()
        {
                if (!local_user()) {
                        throw new HTTPException\UnauthorizedException();
@@ -83,7 +83,7 @@ class Revoke extends BaseModule
                DI::baseUrl()->redirect('contact/' . static::$parameters['id']);
        }
 
-       public static function content(): string
+       public function content(): string
        {
                if (!local_user()) {
                        return Login::form($_SERVER['REQUEST_URI']);
index 9a6e0709f12ea7f49cefa8c43e76b3fff737ff86..58a0c5750b4c536ee58d3555b5322646485c1400 100644 (file)
@@ -49,7 +49,7 @@ class Community extends BaseModule
        protected static $max_id;
        protected static $item_id;
 
-       public static function content()
+       public function content(): string
        {
                self::parseRequest();
 
index 87bce10307c1a545bea877faf4c2c50f882457cc..06fec9ee7cc2aa57e1de9da743c9981ed537f28c 100644 (file)
@@ -57,7 +57,7 @@ class Network extends BaseModule
        /** @var string */
        protected static $order;
 
-       public static function content()
+       public function content(): string
        {
                if (!local_user()) {
                        return Login::form();
index cf3a4ca3424cd27aefb809a8773487a1db46d046..fdd4f6974943f24c8c0daf591b981fca23440ed6 100644 (file)
@@ -32,7 +32,7 @@ use Friendica\DI;
  */
 class Credits extends BaseModule
 {
-       public static function content()
+       public function content(): string
        {
                /* fill the page with credits */
                $credits_string = file_get_contents('CREDITS.txt');
index a02913adadfe25b29184e8e7d46eb52bcc99a97b..cbd658fc915d5fd01f36808d9143dbb24f5ca0aa 100644 (file)
@@ -38,7 +38,7 @@ use Friendica\Network\HTTPException;
  */
 class Notify extends BaseModule
 {
-       public static function post()
+       public function post()
        {
                $postdata = Network::postdata();
 
index 9a2ab4b69f24d1ac75320527b45c6a9acc9e8191..3c4becdd6bc9eb1a8405337554f3348d8af0bf81 100644 (file)
@@ -29,7 +29,7 @@ use Friendica\Protocol\OStatus;
  */
 class Poll extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                header("Content-type: application/atom+xml");
                $last_update = $_GET['last_update'] ?? '';
index 2a06a672c91a0262cb05811afd8ee190746bc63c..7f5fa6274dc31f29a7e8ccb7cd8ce3efb7160599 100644 (file)
@@ -34,7 +34,7 @@ use Friendica\Util\XML;
 
 class ActivityPubConversion extends BaseModule
 {
-       public static function content()
+       public function content(): string
        {
                function visible_whitespace($s)
                {
index 4901684b6a611692c4740e3f032e6ef735ecd4cf..c50bd08d74c4492010e9d9de796312ec6c63beef 100644 (file)
@@ -35,7 +35,7 @@ use Friendica\Util\XML;
  */
 class Babel extends BaseModule
 {
-       public static function content()
+       public function content(): string
        {
                function visible_whitespace($s)
                {
index 0c0c0ded4d1798d0b95ac4b768a6fdd61a9df9a3..2d2a7dc54991bf40719d39e846feb14d281a4b70 100644 (file)
@@ -32,7 +32,7 @@ use Friendica\Protocol;
  */
 class Feed extends BaseModule
 {
-       public static function init()
+       public function init()
        {
                if (!local_user()) {
                        notice(DI::l10n()->t('You must be logged in to use this module'));
@@ -40,7 +40,7 @@ class Feed extends BaseModule
                }
        }
 
-       public static function content()
+       public function content(): string
        {
                $result = [];
                if (!empty($_REQUEST['url'])) {
index 70308964682abe1ef20c4ee9263bc7b9383df5ab..04dab22c6b3918787b0ddae37f2c9f2d86b7ffd0 100644 (file)
@@ -31,7 +31,7 @@ use Friendica\Network\HTTPException;
  */
 class ItemBody extends BaseModule
 {
-       public static function content()
+       public function content(): string
        {
                if (!local_user()) {
                        throw new HTTPException\UnauthorizedException(DI::l10n()->t('Access denied.'));
index 2d784765dd23dcbc5eccadd2b0a5962b1d859edf..6fb91380ae5bdd8e082cd11fd1173a0ea9095a91 100644 (file)
@@ -31,7 +31,7 @@ class Localtime extends BaseModule
 {
        static $mod_localtime = '';
 
-       public static function post()
+       public function post()
        {
                $time = ($_REQUEST['time'] ?? '') ?: 'now';
 
@@ -42,7 +42,7 @@ class Localtime extends BaseModule
                }
        }
 
-       public static function content()
+       public function content(): string
        {
                $time = ($_REQUEST['time'] ?? '') ?: 'now';
 
index 24c8d745c52b1f2abb334178b2ab6913710f2bd8..fcb7dda2188ec4224106edb23d9ea85cb1dbdc0e 100644 (file)
@@ -32,7 +32,7 @@ use Friendica\Network\Probe as NetworkProbe;
  */
 class Probe extends BaseModule
 {
-       public static function content()
+       public function content(): string
        {
                if (!local_user()) {
                        throw new HTTPException\ForbiddenException(DI::l10n()->t('Only logged in users are permitted to perform a probing.'));
index f95d7a2b960ed8e4855ad28deda3b80598d32eb8..4527d2fb22f2b8b88ef34dee661c48ca41979333 100644 (file)
@@ -31,7 +31,7 @@ use Friendica\Network\Probe;
  */
 class WebFinger extends BaseModule
 {
-       public static function content()
+       public function content(): string
        {
                if (!local_user()) {
                        throw new \Friendica\Network\HTTPException\ForbiddenException(DI::l10n()->t('Only logged in users are permitted to perform a probing.'));
index b4845764c3bd51c6c86b9083858ef1fe3e13bcdf..2b36fc2a306600bc978647b1b2ce9ee2f3bc5cb1 100644 (file)
@@ -37,7 +37,7 @@ use Friendica\Util\Proxy;
  */
 class Delegation extends BaseModule
 {
-       public static function post()
+       public function post()
        {
                if (!local_user()) {
                        return;
@@ -112,7 +112,7 @@ class Delegation extends BaseModule
                // NOTREACHED
        }
 
-       public static function content()
+       public function content(): string
        {
                if (!local_user()) {
                        throw new ForbiddenException(DI::l10n()->t('Permission denied.'));
index dc3e76b010cebb757bf8de7995e49a0637f18834..aa582558f8367e814f15c0895411869f7bcf5031 100644 (file)
@@ -38,7 +38,7 @@ use Friendica\Util\Strings;
  */
 class Fetch extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                if (empty(static::$parameters['guid'])) {
                        throw new HTTPException\NotFoundException();
index 2fde1fe3f2374b356d5c3834b3bd17b4d0be0efe..9ac89cc6e66c84e98df700b8d9bfede704318106 100644 (file)
@@ -38,12 +38,12 @@ class Receive extends BaseModule
        /** @var LoggerInterface */
        private static $logger;
 
-       public static function init()
+       public function init()
        {
                self::$logger = DI::logger();
        }
 
-       public static function post()
+       public function post()
        {
                $enabled = DI::config()->get('system', 'diaspora_enabled', false);
                if (!$enabled) {
index 799b18ea10ad4058905570145209245eb3663c58..a81780a28014f5b89af0ec3f5cb423e1d42c1a7d 100644 (file)
@@ -38,7 +38,7 @@ use Friendica\Network\HTTPException;
  */
 class Directory extends BaseModule
 {
-       public static function content()
+       public function content(): string
        {
                $app = DI::app();
                $config = DI::config();
index befd8d7aaeff403eedf02e1eda16e5b9ac99eea1..566cf648a2ad591f3f2552f73ba0cc87d66cb817 100644 (file)
@@ -13,7 +13,7 @@ use Friendica\Util\Temporal;
 
 class Json extends \Friendica\BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                if (!local_user()) {
                        throw new HTTPException\UnauthorizedException();
index 0eca46b1ab8b108e947936e1ff766ec6bc388f4a..94908abe21afed4d7b0c2e97fa8f77ffc043aac8 100644 (file)
@@ -41,7 +41,7 @@ use Friendica\Protocol\Feed as ProtocolFeed;
  */
 class Feed extends BaseModule
 {
-       public static function content()
+       public function content(): string
        {
                $a = DI::app();
 
index e52db81c1252aeb2f47545baf8aaaed1699c4555..43a0ff1fb01fb16818aba56916dea725af9c870a 100644 (file)
@@ -33,7 +33,7 @@ use Friendica\Util\XML;
  */
 class RemoveTag extends BaseModule
 {
-       public static function content()
+       public function content(): string
        {
                if (!local_user()) {
                        throw new HTTPException\ForbiddenException();
@@ -62,7 +62,7 @@ class RemoveTag extends BaseModule
                if ($item_id && strlen($term)) {
                        $item = Post::selectFirst(['uri-id'], ['id' => $item_id]);
                        if (!DBA::isResult($item)) {
-                               return;                         
+                               return '';
                        }
                        if (!Post\Category::deleteFileByURIId($item['uri-id'], local_user(), $type, $term)) {
                                notice(DI::l10n()->t('Item was not removed'));
@@ -74,5 +74,7 @@ class RemoveTag extends BaseModule
                if ($type == Post\Category::FILE) {
                        DI::baseUrl()->redirect('filed?file=' . rawurlencode($term));
                }
+
+               return '';
        }
 }
index 363e51c2107f4afc8d370f1b0dbc39b2a56282ee..ee620f54c68ea7ddca2d453834b0e868d6bf8c51 100644 (file)
@@ -34,7 +34,7 @@ use Friendica\Util\XML;
  */
 class SaveTag extends BaseModule
 {
-       public static function init()
+       public function init()
        {
                if (!local_user()) {
                        notice(DI::l10n()->t('You must be logged in to use this module'));
@@ -42,7 +42,7 @@ class SaveTag extends BaseModule
                }
        }
 
-       public static function rawContent()
+       public function rawContent()
        {
                $logger = DI::logger();
 
index 6e6b4da1df224c46a1967060daadee474a18582b..41f811698bed01514acb221da2ebbd789a754065 100644 (file)
@@ -10,7 +10,7 @@ use Friendica\Model\Contact;
  */
 class FollowConfirm extends BaseModule
 {
-       public static function post()
+       public function post()
        {
                $uid = local_user();
                if (!$uid) {
index 3256a04c2bbdf865fc7291f25da55479f9ad0fa7..cc4041a6f0f9c1b18e4f25e03b3770844abc7075 100644 (file)
@@ -38,14 +38,14 @@ use Friendica\Worker\Delivery;
  */
 class FriendSuggest extends BaseModule
 {
-       public static function init()
+       public function init()
        {
                if (!local_user()) {
                        throw new ForbiddenException(DI::l10n()->t('Permission denied.'));
                }
        }
 
-       public static function post()
+       public function post()
        {
                $cid = intval(static::$parameters['contact']);
 
@@ -83,7 +83,7 @@ class FriendSuggest extends BaseModule
                info(DI::l10n()->t('Friend suggestion sent.'));
        }
 
-       public static function content()
+       public function content(): string
        {
                $cid = intval(static::$parameters['contact']);
 
index 082c5c0812ec71394a40a4d8c647868aaccf2fae..b4de151e9783b410510aa67d26b53dfc5f53cf73 100644 (file)
@@ -38,7 +38,7 @@ use Friendica\Protocol\ActivityPub;
  */
 class Friendica extends BaseModule
 {
-       public static function content()
+       public function content(): string
        {
                $config = DI::config();
 
@@ -110,7 +110,7 @@ class Friendica extends BaseModule
                ]);
        }
 
-       public static function rawContent()
+       public function rawContent()
        {
                if (ActivityPub::isRequest()) {
                        try {
index 69baef9f4df481cef3b43a5b2cf1248bce0eb600..1750d3e04f7b2581d4517cf309af882de69358ed 100644 (file)
@@ -32,7 +32,7 @@ require_once 'boot.php';
 
 class Group extends BaseModule
 {
-       public static function post()
+       public function post()
        {
                $a = DI::app();
 
@@ -138,7 +138,7 @@ class Group extends BaseModule
                }
        }
 
-       public static function content()
+       public function content(): string
        {
                $change = false;
 
index 269deff0682491b7a9ea702dcd31dcf8784ae5e9..7dabf6c692d4dd8354daf75d4b22b41bbefae346 100644 (file)
@@ -34,7 +34,7 @@ use Friendica\Network\HTTPException;
  */
 class HCard extends BaseModule
 {
-       public static function content()
+       public function content(): string
        {
                if ((local_user()) && (static::$parameters['action'] ?? '') === 'view') {
                        // A logged in user views a profile of a user
index 87458324686a6e7486789c613568ff1027eae5d1..07aab537a869d3faf1994db31ae826d9cbae9007 100644 (file)
@@ -27,7 +27,7 @@ use Friendica\Network\HTTPException;
 
 class MethodNotAllowed extends BaseModule
 {
-       public static function content()
+       public function content(): string
        {
                throw new HTTPException\MethodNotAllowedException(DI::l10n()->t('Method Not Allowed.'));
        }
index 5ba5466241ce52473088bf89626fd7fc24241f82..6af5e91ae61e050ca36086ab01bba8e962f7e83a 100644 (file)
@@ -27,7 +27,7 @@ use Friendica\Network\HTTPException;
 
 class PageNotFound extends BaseModule
 {
-       public static function content()
+       public function content(): string
        {
                throw new HTTPException\NotFoundException(DI::l10n()->t('Page not found.'));
        }
index aebe15dd0d0e325e8d3ffa979ec7751af8264fe6..8910d9cce473c3b78680534f31b4e092628ab7d6 100644 (file)
@@ -31,7 +31,7 @@ use Friendica\Util\Strings;
  */
 class Hashtag extends BaseModule
 {
-       public static function content()
+       public function content(): string
        {
                $result = [];
 
@@ -47,5 +47,7 @@ class Hashtag extends BaseModule
                DBA::close($taglist);
 
                System::jsonExit($result);
+
+               return '';
        }
 }
index 5440fd97d8a33c63d2d359528f20c5e0ac864268..64ba68f5cc42f38ec1a45f7a9f03ede71d670d1e 100644 (file)
@@ -32,7 +32,7 @@ use Friendica\Network\HTTPException;
  */
 class Help extends BaseModule
 {
-       public static function content()
+       public function content(): string
        {
                Nav::setSelected('help');
 
index 719d87452242b75f0cf7307969c6d4b7e9285515..f4e6b973398e1a23c1e72654a61197460b119e20 100644 (file)
@@ -32,7 +32,7 @@ use Friendica\Module\Security\Login;
  */
 class Home extends BaseModule
 {
-       public static function content()
+       public function content(): string
        {
                $app = DI::app();
                $config = DI::config();
index 72b83ebffd3155843a5bd5f18dcf5f015b618e4a..8f872c683e4421cab608df6d6bbb4e093ddf0706 100644 (file)
@@ -65,7 +65,7 @@ class Install extends BaseModule
         */
        private static $installer;
 
-       public static function init()
+       public function init()
        {
                $a = DI::app();
 
@@ -94,7 +94,7 @@ class Install extends BaseModule
                self::$currentWizardStep = ($_POST['pass'] ?? '') ?: self::SYSTEM_CHECK;
        }
 
-       public static function post()
+       public function post()
        {
                $a           = DI::app();
                $configCache = $a->getConfigCache();
@@ -177,7 +177,7 @@ class Install extends BaseModule
                }
        }
 
-       public static function content()
+       public function content(): string
        {
                $a           = DI::app();
                $configCache = $a->getConfigCache();
index 3c82a26c1448cd637f8ed80ec50069e2a3f80ba9..10346a5162750b6ec864fbe619c59314419b12d1 100644 (file)
@@ -35,7 +35,7 @@ use Friendica\Util\Strings;
  */
 class Invite extends BaseModule
 {
-       public static function post()
+       public function post()
        {
                if (!local_user()) {
                        throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
@@ -124,7 +124,7 @@ class Invite extends BaseModule
                info(DI::l10n()->tt('%d message sent.', '%d messages sent.', $total));
        }
 
-       public static function content()
+       public function content(): string
        {
                if (!local_user()) {
                        throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
index 6006be9c7d4e2b5b328c076872d227506762dd78..b92b0acf6887fc3fc621719f920189136dfba073 100644 (file)
@@ -38,7 +38,7 @@ use Friendica\Network\HTTPException;
  */
 class Activity extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                if (!Session::isAuthenticated()) {
                        throw new HTTPException\ForbiddenException();
index c229fb15aeb5f81b4e8c0a18be41dee50a8ec207..7867b98586b2559e076af679c21f3efd7a510bf2 100644 (file)
@@ -40,7 +40,7 @@ use Friendica\Util\Temporal;
 
 class Compose extends BaseModule
 {
-       public static function post()
+       public function post()
        {
                if (!empty($_REQUEST['body'])) {
                        $_REQUEST['return'] = 'network';
@@ -51,7 +51,7 @@ class Compose extends BaseModule
                }
        }
 
-       public static function content()
+       public function content(): string
        {
                if (!local_user()) {
                        return Login::form('compose', false);
index 923048447b4cdc28c0cb0ccf0bd6ba8f41e6333f..baa99c21e052c51176d486dd16d9a44873a313a7 100644 (file)
@@ -34,7 +34,7 @@ use Friendica\Network\HTTPException;
  */
 class Follow extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                $l10n = DI::l10n();
 
index 19ac90e47c0cd8d5168905234165e466f14ce9fc..e38dd46bc73d749adbad52020f7b7b4953a201b1 100644 (file)
@@ -33,7 +33,7 @@ use Friendica\Network\HTTPException;
  */
 class Ignore extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                $l10n = DI::l10n();
 
index c451bae480d626af5bba90ba2b6c26e186500de9..185b418bb6fdb4a972cecad27cae3c68874fea28 100644 (file)
@@ -34,7 +34,7 @@ use Friendica\Network\HTTPException;
  */
 class Pin extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                $l10n = DI::l10n();
 
index d24fb54ac7f1e322c168493650e10a24d51f8dd1..336207718eceb29f69e81e79c6a9664116a657d9 100644 (file)
@@ -35,7 +35,7 @@ use Friendica\Network\HTTPException;
  */
 class Star extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                $l10n = DI::l10n();
 
index 63f8ee9c1c54029428b4a24cea33520306c6c4c5..af9e5084a1a33856ead632eb9b8741fc7fe7288f 100644 (file)
@@ -39,7 +39,7 @@ use Friendica\Util\Strings;
  */
 class Magic extends BaseModule
 {
-       public static function init()
+       public function init()
        {
                $a = DI::app();
                $ret = ['success' => false, 'url' => '', 'message' => ''];
index d13c5fe02762bfb70bf8b4a58be509b6eadca5a8..2025a5fa4d121543f28392b617bad356cbb6d07a 100644 (file)
@@ -34,7 +34,7 @@ use Friendica\Util\Strings;
  */
 class Maintenance extends BaseModule
 {
-       public static function content()
+       public function content(): string
        {
                $reason = DI::config()->get('system', 'maintenance_reason');
 
index 4a226ac63fa160375a519f042f8a9386ceb1ccf9..ff462fd3e2de79202b260c9ddbe6a5e39765f039 100644 (file)
@@ -27,7 +27,7 @@ use Friendica\DI;
 
 class Manifest extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                $config = DI::config();
 
index 96e4d7658decc23253da1d3fe1d47fdc50e6f317..c5a66c9bb6c972133cc9823c96c4eef80d2a386d 100644 (file)
@@ -35,7 +35,7 @@ use Friendica\Model\User;
  */
 class NoScrape extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                $a = DI::app();
 
index 3923b7e21c52b1e2d65537cf7b52c9dba11c258d..d8f8a5049a3c1ee42051f4af3cd4c56ecb8824a2 100644 (file)
@@ -33,7 +33,7 @@ use Friendica\Model\Nodeinfo;
  */
 class NodeInfo110 extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                $config = DI::config();
 
index 471f0f212f7d1d4323128e83ad92afb271862ccf..aac8c6d4fcd0c2e242b36b4c292ab5ec9635fe77 100644 (file)
@@ -33,7 +33,7 @@ use Friendica\Model\Nodeinfo;
  */
 class NodeInfo120 extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                $config = DI::config();
 
index 02324a92bed902c65deb46e827edbd63e13ff94f..cb55411f23cfbd3414f72eaf7ef12b6c932cf85b 100644 (file)
@@ -33,7 +33,7 @@ use Friendica\Model\Nodeinfo;
  */
 class NodeInfo210 extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                $config = DI::config();
 
index 234175dd8822aa0558596282fc3b6259dfb78023..7379510d819ecb3e0f2fffe90c29cc22821b506b 100644 (file)
@@ -55,7 +55,7 @@ class Introductions extends BaseNotifications
                ];
        }
 
-       public static function content()
+       public function content(): string
        {
                Nav::setSelected('introductions');
 
index 5c27abbbba76786e34613f96bb2bb703fed2316e..1ceafc105b6208b3c731712a9723479d478a71bb 100644 (file)
@@ -42,7 +42,7 @@ class Notification extends BaseModule
         * @throws \ImagickException
         * @throws \Exception
         */
-       public static function post()
+       public function post()
        {
                if (!local_user()) {
                        throw new HTTPException\UnauthorizedException(DI::l10n()->t('Permission denied.'));
@@ -73,7 +73,7 @@ class Notification extends BaseModule
         *
         * @throws HTTPException\UnauthorizedException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                if (!local_user()) {
                        throw new HTTPException\UnauthorizedException(DI::l10n()->t('Permission denied.'));
@@ -101,7 +101,7 @@ class Notification extends BaseModule
         * @throws HTTPException\InternalServerErrorException
         * @throws \Exception
         */
-       public static function content(): string
+       public function content(): string
        {
                if (!local_user()) {
                        notice(DI::l10n()->t('You must be logged in to show this page.'));
index 9b43647e9a61ef552ad416e2cc1908abfeb10939..eef4af9bc42d57d980ea8ef47aea7ae831aa8e98 100644 (file)
@@ -82,7 +82,7 @@ class Notifications extends BaseNotifications
                ];
        }
 
-       public static function content()
+       public function content(): string
        {
                Nav::setSelected('notifications');
 
index ffce1caae3ce558887d49fd82dd58beead90befb..f0915df41abc46f344504b70e62049796a477d76 100644 (file)
@@ -30,13 +30,13 @@ use Friendica\Module\BaseApi;
  */
 class Acknowledge extends BaseApi
 {
-       public static function post()
+       public function post()
        {
                DI::session()->set('oauth_acknowledge', true);
                DI::app()->redirect(DI::session()->get('return_path'));
        }
 
-       public static function content()
+       public function content(): string
        {
                DI::session()->set('return_path', $_REQUEST['return_path'] ?? '');
 
index ede46720a32806b6adbc53d219a3cde1c3bd03b3..d39cbe353d0299b1e65c3c3081db2aa587f0ff30 100644 (file)
@@ -37,7 +37,7 @@ class Authorize extends BaseApi
        /**
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                $request = self::getRequest([
                        'force_login'   => '', // Forces the user to re-login, which is necessary for authorizing with multiple accounts from the same instance.
@@ -97,7 +97,7 @@ class Authorize extends BaseApi
                self::$oauth_code = $token['code'];
        }
 
-       public static function content()
+       public function content(): string
        {
                if (empty(self::$oauth_code)) {
                        return '';
index 156ef1c199332ef401b86a222e65ea566deef192..bf906ab454d39a0de50d2cf22d24cbf3b8b1ef1b 100644 (file)
@@ -32,7 +32,7 @@ use Friendica\Module\BaseApi;
  */
 class Revoke extends BaseApi
 {
-       public static function post()
+       public function post()
        {
                $request = self::getRequest([
                        'client_id'     => '', // Client ID, obtained during app registration
index 2ef26cbf1bb2056646fd56c68962a176ef713600..6aef63f302940487450698d8bde4264f5e29b966 100644 (file)
@@ -34,7 +34,7 @@ use Friendica\Security\OAuth;
  */
 class Token extends BaseApi
 {
-       public static function post()
+       public function post()
        {
                $request = self::getRequest([
                        'client_id'     => '', // Client ID, obtained during app registration
index 5564fdacaa05418f90d4d1f958ff18743bd6f8c6..1b38c0e9730fd35054ee62486e6aa51d9df6b29b 100644 (file)
@@ -37,7 +37,7 @@ use Friendica\Util\Strings;
  */
 class Oembed extends BaseModule
 {
-       public static function content()
+       public function content(): string
        {
                // Unused form: /oembed/b2h?url=...
                if (DI::args()->getArgv()[1] == 'b2h') {
index a6393726d7e4867f26ae79d9c106a79be855fd8e..e5212c251979e412bc4a7b3cfd5f0265919a9824 100644 (file)
@@ -36,7 +36,7 @@ class OpenSearch extends BaseModule
        /**
         * @throws \Exception
         */
-       public static function rawContent()
+       public function rawContent()
        {
                header('Content-type: application/opensearchdescription+xml');
 
index a46734987837b4f5186c18b24de5e179aef6fb63..85530df6f96a16e07d1040de3827010cb9c53bd3 100644 (file)
@@ -44,7 +44,7 @@ use Friendica\Util\Strings;
  */
 class Owa extends BaseModule
 {
-       public static function init()
+       public function init()
        {
 
                $ret = [ 'success' => false ];
index f8665c535714a2f42f5d4642a7f125ef33228768..092d6ec747bd0ac96cf495757c4f3bad7a60a6ff 100644 (file)
@@ -31,7 +31,7 @@ use Friendica\Util;
 
 class ParseUrl extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                if (!Session::isAuthenticated()) {
                        throw new \Friendica\Network\HTTPException\ForbiddenException();
index 89ed260f9c22e0b704f05a5ac37419a6604fcfa3..bf0cc0d63e881896722e36193f483bbb5e9cab64 100644 (file)
@@ -15,7 +15,7 @@ use Friendica\Network\HTTPException;
  */
 class PermissionTooltip extends \Friendica\BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                $type = static::$parameters['type'];
                $referenceId = static::$parameters['id'];
index 2a45ef047808f4f74a19873d43043a51cb6fe5e4..4ea3617acf65fad539270554f1b2ed9785c15436 100644 (file)
@@ -51,7 +51,7 @@ class Photo extends BaseModule
         * Fetch a photo or an avatar, in optional size, check for permissions and
         * return the image
         */
-       public static function rawContent()
+       public function rawContent()
        {
                $totalstamp = microtime(true);
 
index a46973967989b346a3c8984efaad7d051c9c6b1c..d95f2b01ef2653647cd4fac33e0091c2a3ab1852 100644 (file)
@@ -35,7 +35,7 @@ use Friendica\Network\HTTPException;
 
 class Common extends BaseProfile
 {
-       public static function content()
+       public function content(): string
        {
                if (DI::config()->get('system', 'block_public') && !Session::isAuthenticated()) {
                        throw new HTTPException\NotFoundException(DI::l10n()->t('User not found.'));
index 0f28be641cdcc6a9697773f9db64ea5d6e5d1587..d849d57783053566c408d61866784346021ab63d 100644 (file)
@@ -34,7 +34,7 @@ use Friendica\Network\HTTPException;
 
 class Contacts extends Module\BaseProfile
 {
-       public static function content()
+       public function content(): string
        {
                if (DI::config()->get('system', 'block_public') && !Session::isAuthenticated()) {
                        throw new HTTPException\NotFoundException(DI::l10n()->t('User not found.'));
index 4f46efaa332aad59b3cf9100ffa00da84a176880..e6249f90e54af4fe3d56ed575efa9ec08b947ffe 100644 (file)
@@ -34,13 +34,13 @@ use Friendica\BaseModule;
  */
 class Index extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
-               Profile::rawContent();
+               (new Profile(static::$parameters))->rawContent();
        }
 
-       public static function content()
+       public function content(): string
        {
-               return Status::content();
+               return (new Status(static::$parameters))->content();
        }
 }
index f46097814f5ea0484d5679068212c81a60c73409..0f34b267deac81ed1a522c30f34ee46eedff8fcd 100644 (file)
@@ -29,7 +29,7 @@ use Friendica\Network\HTTPException;
 
 class Media extends BaseProfile
 {
-       public static function content()
+       public function content(): string
        {
                $a = DI::app();
 
index c1792ad4e6980e47a112c6c4853dfe1efea3fda2..32d3aae700f09d93c1d755848b99cfff050b8fae 100644 (file)
@@ -46,7 +46,7 @@ use Friendica\Util\Temporal;
 
 class Profile extends BaseProfile
 {
-       public static function rawContent()
+       public function rawContent()
        {
                if (ActivityPub::isRequest()) {
                        $user = DBA::selectFirst('user', ['uid'], ['nickname' => static::$parameters['nickname']]);
@@ -73,7 +73,7 @@ class Profile extends BaseProfile
                }
        }
 
-       public static function content()
+       public function content(): string
        {
                $a = DI::app();
 
index eaeeb85406ec70b7d70603aaad4c09e900a0e57c..72208fe79894397530fd50a891f33b6efb972b94 100644 (file)
@@ -33,7 +33,7 @@ use Friendica\Util\DateTimeFormat;
 
 class Schedule extends BaseProfile
 {
-       public static function post()
+       public function post()
        {
                if (!local_user()) {
                        throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
@@ -50,7 +50,7 @@ class Schedule extends BaseProfile
                Post\Delayed::deleteById($_REQUEST['delete']);
        }
 
-       public static function content()
+       public function content(): string
        {
                if (!local_user()) {
                        throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
index 995939ce7ce824a5f75f05dace7c5fb2236350f0..db5400bff17bcdfad99b6b6477cd760dd3e13c53 100644 (file)
@@ -46,7 +46,7 @@ use Friendica\Util\XML;
 
 class Status extends BaseProfile
 {
-       public static function content()
+       public function content(): string
        {
                $args = DI::args();
 
index a9c8c0b9e6361e6fce9a9d685feb516694296128..7a7c7b082b44d99469537f15706d4aeeeb2b8191 100644 (file)
@@ -44,7 +44,7 @@ class Proxy extends BaseModule
        /**
         * Fetch remote image content
         */
-       public static function rawContent()
+       public function rawContent()
        {
                $request = self::getRequestInfo();
 
index 22269984a8d182c51bd080c50e706b7e62fa7f5d..9df9f5857b779e0971611742eeecd2b3c1cdfb69 100644 (file)
@@ -33,7 +33,7 @@ use Friendica\Util\Strings;
  */
 class PublicRSAKey extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                if (empty(static::$parameters['nick'])) {
                        throw new BadRequestException();
index b50746701d078053b5419bf1fb1ad6294750abd1..38cd684294e54e3db4a394649d210dc4ad2a8be8 100644 (file)
@@ -30,7 +30,7 @@ use Friendica\Model\Contact;
  */
 class RandomProfile extends BaseModule
 {
-       public static function content()
+       public function content(): string
        {
                $a = DI::app();
 
@@ -42,5 +42,7 @@ class RandomProfile extends BaseModule
                }
 
                DI::baseUrl()->redirect('profile');
+
+               return '';
        }
 }
index 50b9660020374f3d7f0b5743ecabd62941d49d65..fe071fc550b17d86f448eb473cc9932f86fc42b6 100644 (file)
@@ -31,7 +31,7 @@ use Friendica\Util\XML;
  */
 class ReallySimpleDiscovery extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                header('Content-Type: text/xml');
 
index 7c0d3f690d11872b5f0e37c27be353310cb9dffc..42b95e78e96a9683c1561c50a68fb31d02cf958e 100644 (file)
@@ -53,7 +53,7 @@ class Register extends BaseModule
         *
         * @return string
         */
-       public static function content()
+       public function content(): string
        {
                // logged in users can register others (people/pages/groups)
                // even with closed registrations, unless specifically prohibited by site policy.
@@ -182,7 +182,7 @@ class Register extends BaseModule
         * Extend this method if the module is supposed to process POST requests.
         * Doesn't display any content
         */
-       public static function post()
+       public function post()
        {
                BaseModule::checkFormSecurityTokenRedirectOnError('/register', 'register');
 
index df67e60c65a6be5326be53f95a89090e0092e62b..b6b0255fcbc48eb93f1743513753b25ef61790ee 100644 (file)
@@ -42,7 +42,7 @@ class RemoteFollow extends BaseModule
 {
        static $owner;
 
-       public static function init()
+       public function init()
        {
                self::$owner = User::getOwnerDataByNick(static::$parameters['profile']);
                if (!self::$owner) {
@@ -52,7 +52,7 @@ class RemoteFollow extends BaseModule
                DI::page()['aside'] = Widget\VCard::getHTML(self::$owner);
        }
 
-       public static function post()
+       public function post()
        {
                if (!empty($_POST['cancel']) || empty($_POST['dfrn_url'])) {
                        DI::baseUrl()->redirect();
@@ -96,7 +96,7 @@ class RemoteFollow extends BaseModule
                System::externalRedirect($follow_link);
        }
 
-       public static function content()
+       public function content(): string
        {
                if (empty(self::$owner)) {
                        return '';
index c2b2d624ddf650d7e10eaac5f584bb6af561d6e2..ec7ee086ec640388d668f7bc811885dc77b47d10 100644 (file)
@@ -28,7 +28,7 @@ use Friendica\BaseModule;
  */
 class RobotsTxt extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                $allDisalloweds = [
                        '/settings/',
index 8ec8dd9bbb45adc0b9f6b23984edf38ad22ebf32..0866b5f9aeac430c115181236e6112cdba59e45f 100644 (file)
@@ -48,7 +48,7 @@ class Acl extends BaseModule
        const TYPE_PRIVATE_MESSAGE       = 'm';
        const TYPE_ANY_CONTACT           = 'a';
 
-       public static function rawContent()
+       public function rawContent()
        {
                if (!local_user()) {
                        throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this module.'));
index 5b5a1ba2855dbdb73e763bbea7749515f6e2e555..bbd90f137d37593a4a91e8d6e799df522f85e8a2 100644 (file)
@@ -31,7 +31,7 @@ use Friendica\Module\Security\Login;
  */
 class Directory extends BaseSearch
 {
-       public static function content()
+       public function content(): string
        {
                if (!local_user()) {
                        notice(DI::l10n()->t('Permission denied.'));
index f3cad86208c991c29cb4a6487bb962a0f12d57a6..519b0ece02b6ea34d502da3afdc526b039c1a359 100644 (file)
@@ -17,7 +17,7 @@ use Friendica\Module\Security\Login;
 
 class Filed extends BaseSearch
 {
-       public static function content()
+       public function content(): string
        {
                if (!local_user()) {
                        return Login::form();
index 941b4c577030425cbc7665dbb1a456ba70507cf1..2118aeaaeeb0c4bbb22d592f205caf9b8892c700 100644 (file)
@@ -41,7 +41,7 @@ use Friendica\Network\HTTPException;
 
 class Index extends BaseSearch
 {
-       public static function content()
+       public function content(): string
        {
                $search = (!empty($_GET['q']) ? trim(rawurldecode($_GET['q'])) : '');
 
index 436e3f9589631d527c7a873c226fab6b6f281790..43c33d5446f8a5b5dc641e12c577ac012451c7e0 100644 (file)
@@ -28,7 +28,7 @@ use Friendica\DI;
 
 class Saved extends BaseModule
 {
-       public static function init()
+       public function init()
        {
                $action = DI::args()->get(2, 'none');
                $search = trim(rawurldecode($_GET['term'] ?? ''));
index e157ac0898f733f1cd80201d62688a19a6934d40..5c47e97496e1324743e23b5d390946ea9643c271 100644 (file)
@@ -33,7 +33,7 @@ use Friendica\Module\Register;
  */
 class Login extends BaseModule
 {
-       public static function content()
+       public function content(): string
        {
                $return_path = $_REQUEST['return_path'] ?? '' ;
 
@@ -46,7 +46,7 @@ class Login extends BaseModule
                return self::form(Session::get('return_path'), intval(DI::config()->get('config', 'register_policy')) !== \Friendica\Module\Register::CLOSED);
        }
 
-       public static function post()
+       public function post()
        {
                $return_path = Session::get('return_path');
                Session::clear();
index 35658797ce4c1c4de69748d329911025b122c85d..604c9fc1757356e3f8270304f1a8fd9d008be444 100644 (file)
@@ -36,7 +36,7 @@ class Logout extends BaseModule
        /**
         * Process logout requests
         */
-       public static function init()
+       public function init()
        {
                $visitor_home = null;
                if (remote_user()) {
index 4459b2cf8c989b98b096f50d28af31031bfe4f15..360c9c672f3c6e06c029b9426b9084f29cee498e 100644 (file)
@@ -31,7 +31,7 @@ use LightOpenID;
  */
 class OpenID extends BaseModule
 {
-       public static function content()
+       public function content(): string
        {
                if (DI::config()->get('system', 'no_openid')) {
                        DI::baseUrl()->redirect();
@@ -97,5 +97,7 @@ class OpenID extends BaseModule
                                DI::baseUrl()->redirect('login');
                        }
                }
+
+               return '';
        }
 }
index 5bcf6add8ed99a9faaf53c104c23c7ee09d994ec..193fcb844706542cf9f4675d772aaf273f4bc696 100644 (file)
@@ -35,14 +35,14 @@ use Friendica\Security\TwoFactor\Model\RecoveryCode;
  */
 class Recovery extends BaseModule
 {
-       public static function init()
+       public function init()
        {
                if (!local_user()) {
                        return;
                }
        }
 
-       public static function post()
+       public function post()
        {
                if (!local_user()) {
                        return;
@@ -67,7 +67,7 @@ class Recovery extends BaseModule
                }
        }
 
-       public static function content()
+       public function content(): string
        {
                if (!local_user()) {
                        DI::baseUrl()->redirect();
index 3209b3f56dbbb8a973c21e944bc50aea0741c4db..3669943ba40e31735bca83eb325b7289c8806382 100644 (file)
@@ -38,7 +38,7 @@ class Verify extends BaseModule
 {
        private static $errors = [];
 
-       public static function post()
+       public function post()
        {
                if (!local_user()) {
                        return;
@@ -78,7 +78,7 @@ class Verify extends BaseModule
                }
        }
 
-       public static function content()
+       public function content(): string
        {
                if (!local_user()) {
                        DI::baseUrl()->redirect();
index f98583a2a25cd8b7778f1b7111d6ce1d7d495efe..a2e45883967369cc825b7f518e3044ffa2bbb626 100644 (file)
@@ -36,7 +36,7 @@ use Friendica\Util\Strings;
  */
 class Delegation extends BaseSettings
 {
-       public static function post()
+       public function post()
        {
                if (!DI::app()->isLoggedIn()) {
                        throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
@@ -62,7 +62,7 @@ class Delegation extends BaseSettings
                DBA::update('user', ['parent-uid' => $parent_uid], ['uid' => local_user()]);
        }
 
-       public static function content()
+       public function content(): string
        {
                parent::content();
 
index 42632fe0f8882abc1ab6bebbc714d483a6112267..aab8f864b1ac55aaa9d09faee93200afbd62ac5d 100644 (file)
@@ -36,7 +36,7 @@ use Friendica\Network\HTTPException;
  */
 class Display extends BaseSettings
 {
-       public static function post()
+       public function post()
        {
                if (!DI::app()->isLoggedIn()) {
                        throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
@@ -112,7 +112,7 @@ class Display extends BaseSettings
                DI::baseUrl()->redirect('settings/display');
        }
 
-       public static function content()
+       public function content(): string
        {
                parent::content();
 
index 8b2510050f3ad479f37ed4b8992cacd7c5abaee9..161c440b60a1f6999e330db586332647e9b9e010 100644 (file)
@@ -41,7 +41,7 @@ use Friendica\Util\Temporal;
 
 class Index extends BaseSettings
 {
-       public static function post()
+       public function post()
        {
                if (!local_user()) {
                        return;
@@ -135,7 +135,7 @@ class Index extends BaseSettings
                DI::baseUrl()->redirect('settings/profile');
        }
 
-       public static function content()
+       public function content(): string
        {
                if (!local_user()) {
                        notice(DI::l10n()->t('You must be logged in to use this module'));
index b983674383c7d62bf9864ad8430bcb95d84e7132..c23361cf8182a73bbc7cba168f6993ae160d1236 100644 (file)
@@ -33,7 +33,7 @@ use Friendica\Network\HTTPException;
 
 class Crop extends BaseSettings
 {
-       public static function post()
+       public function post()
        {
                if (!Session::isAuthenticated()) {
                        return;
@@ -160,7 +160,7 @@ class Crop extends BaseSettings
                DI::baseUrl()->redirect($path);
        }
 
-       public static function content()
+       public function content(): string
        {
                if (!Session::isAuthenticated()) {
                        throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
index 423d0971e877615f87b398490a95df1d2814c025..2e65a01c61290ca593c5c2dae494fc8d4af435e6 100644 (file)
@@ -34,7 +34,7 @@ use Friendica\Util\Strings;
 
 class Index extends BaseSettings
 {
-       public static function post()
+       public function post()
        {
                if (!Session::isAuthenticated()) {
                        return;
@@ -106,7 +106,7 @@ class Index extends BaseSettings
                DI::baseUrl()->redirect('settings/profile/photo/crop/' . $resource_id);
        }
 
-       public static function content()
+       public function content(): string
        {
                if (!Session::isAuthenticated()) {
                        throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
index 21304d10e1c50d8f557709241dd2cfcfdf43bf20..74a9ba6578955dc1be6512a68d696ea160a243d3 100644 (file)
@@ -36,7 +36,7 @@ class AppSpecific extends BaseSettings
 {
        private static $appSpecificPassword = null;
 
-       public static function init()
+       public function init()
        {
                if (!local_user()) {
                        return;
@@ -54,7 +54,7 @@ class AppSpecific extends BaseSettings
                }
        }
 
-       public static function post()
+       public function post()
        {
                if (!local_user()) {
                        return;
@@ -97,7 +97,7 @@ class AppSpecific extends BaseSettings
                }
        }
 
-       public static function content()
+       public function content(): string
        {
                if (!local_user()) {
                        return Login::form('settings/2fa/app_specific');
index b173a092d4f2d757907e36821aef400bb6a3982d..0dcef14ad9deb17d55bf527f9f72946fdb608132 100644 (file)
@@ -33,7 +33,7 @@ use PragmaRX\Google2FA\Google2FA;
 
 class Index extends BaseSettings
 {
-       public static function post()
+       public function post()
        {
                if (!local_user()) {
                        return;
@@ -94,7 +94,7 @@ class Index extends BaseSettings
                }
        }
 
-       public static function content()
+       public function content(): string
        {
                if (!local_user()) {
                        return Login::form('settings/2fa');
index 25832d2e6f2cbbd9e58293fdc8ebbb68cd2e0051..d46f6a8f526c4e8866cbdb9fc368908183fc9268 100644 (file)
@@ -34,7 +34,7 @@ use Friendica\Module\Security\Login;
  */
 class Recovery extends BaseSettings
 {
-       public static function init()
+       public function init()
        {
                if (!local_user()) {
                        return;
@@ -52,7 +52,7 @@ class Recovery extends BaseSettings
                }
        }
 
-       public static function post()
+       public function post()
        {
                if (!local_user()) {
                        return;
@@ -69,7 +69,7 @@ class Recovery extends BaseSettings
                }
        }
 
-       public static function content()
+       public function content(): string
        {
                if (!local_user()) {
                        return Login::form('settings/2fa/recovery');
index c719dc58157ece95f3d646b4011e6a10bffefb5e..d1e0c177a9c20cd64d95bc40f9961e0cfcfa81bb 100644 (file)
@@ -14,7 +14,7 @@ use UAParser\Parser;
  */
 class Trusted extends BaseSettings
 {
-       public static function init()
+       public function init()
        {
                if (!local_user()) {
                        return;
@@ -32,7 +32,7 @@ class Trusted extends BaseSettings
                }
        }
 
-       public static function post()
+       public function post()
        {
                if (!local_user()) {
                        return;
@@ -64,7 +64,7 @@ class Trusted extends BaseSettings
        }
 
 
-       public static function content(): string
+       public function content(): string
        {
                parent::content();
 
index 27c9631d4e4def4f2e1061099bc550323cadaaf6..18aa6ca9f08c0faab290a9e26244b9196c441b63 100644 (file)
@@ -39,7 +39,7 @@ use PragmaRX\Google2FA\Google2FA;
  */
 class Verify extends BaseSettings
 {
-       public static function init()
+       public function init()
        {
                if (!local_user()) {
                        return;
@@ -58,7 +58,7 @@ class Verify extends BaseSettings
                }
        }
 
-       public static function post()
+       public function post()
        {
                if (!local_user()) {
                        return;
@@ -84,7 +84,7 @@ class Verify extends BaseSettings
                }
        }
 
-       public static function content()
+       public function content(): string
        {
                if (!local_user()) {
                        return Login::form('settings/2fa/verify');
index 27e82c4cf81fe451a64e593e14d7e814d60f3663..b5d79c4af5ac0ab63da19aa03b87a165e16480e1 100644 (file)
@@ -51,7 +51,7 @@ class UserExport extends BaseSettings
         * @throws HTTPException\ForbiddenException
         * @throws HTTPException\InternalServerErrorException
         */
-       public static function content()
+       public function content(): string
        {
                if (!local_user()) {
                        throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
@@ -85,7 +85,7 @@ class UserExport extends BaseSettings
         *
         * @throws HTTPException\ForbiddenException
         */
-       public static function rawContent()
+       public function rawContent()
        {
                if (!DI::app()->isLoggedIn()) {
                        throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
index 1ffff65c07273dfc7ab63166e6e4824acd906306..ded79800503796b26fe71db46179381a3a892622 100644 (file)
@@ -33,7 +33,7 @@ use Friendica\DI;
  */
 class Smilies extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                if (!empty(DI::args()->getArgv()[1]) && (DI::args()->getArgv()[1] === "json")) {
                        $smilies = Content\Smilies::getList();
@@ -45,7 +45,7 @@ class Smilies extends BaseModule
                }
        }
 
-       public static function content()
+       public function content(): string
        {
                $smilies = Content\Smilies::getList();
                $count = count($smilies['texts'] ?? []);
index 3b771c3ac7d5bc7b8c2ef426e1e3873e73b94469..44f48ff2eb9929c58c31cc5ab092e33b1f0ca587 100644 (file)
@@ -65,7 +65,7 @@ class HTTPException
         * @param \Friendica\Network\HTTPException $e
         * @throws \Exception
         */
-       public static function rawContent(\Friendica\Network\HTTPException $e)
+       public function rawContent(\Friendica\Network\HTTPException $e)
        {
                $content = '';
 
@@ -84,7 +84,7 @@ class HTTPException
         * @return string
         * @throws \Exception
         */
-       public static function content(\Friendica\Network\HTTPException $e)
+       public function content(\Friendica\Network\HTTPException $e): string
        {
                header($_SERVER["SERVER_PROTOCOL"] . ' ' . $e->getCode() . ' ' . $e->getDescription());
 
index 6b6e4316505d5c048c20ad8a21a46bc47cb386bb..a78031c369afc1a13bfee73a31a16ef803b8b635 100644 (file)
@@ -28,14 +28,14 @@ use Friendica\Network\HTTPException\NotFoundException;
 
 class Statistics extends BaseModule
 {
-       public static function init()
+       public function init()
        {
                if (!DI::config()->get("system", "nodeinfo")) {
                        throw new NotFoundException();
                }
        }
 
-       public static function rawContent()
+       public function rawContent()
        {
                $config = DI::config();
                $logger = DI::logger();
index 201558ab7925290598c7f71dafdad2b7652d2249..cd393d641de7c5f56a32cac26236c7e8ae4441b0 100644 (file)
@@ -30,7 +30,7 @@ use Friendica\Util\Strings;
  */
 class Theme extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                header('Content-Type: text/css');
 
index 0f45af13c52c1bee4d99404046166afbf99a34a6..5b931e117244a0e1696e240956fa1a2cf48739ba 100644 (file)
@@ -29,7 +29,7 @@ use Friendica\Core\Theme;
  */
 class ThemeDetails extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                if (!empty($_REQUEST['theme'])) {
                        $theme = $_REQUEST['theme'];
index 7cf53633a0fb893f973b12529c7ec135d53a5482..a0fb2f88f648904fe142fb6c55ee92c697add858 100644 (file)
@@ -29,7 +29,7 @@ use Friendica\DI;
  */
 class ToggleMobile extends BaseModule
 {
-       public static function content()
+       public function content(): string
        {
                $a = DI::app();
 
@@ -46,5 +46,7 @@ class ToggleMobile extends BaseModule
                }
 
                $a->redirect($address);
+
+               return '';
        }
 }
index 1c91641f531537a6164b865e28313c45f5243b84..8357ead18a91af3366d760c6147a6e62788a0967 100644 (file)
@@ -60,7 +60,7 @@ class Tos extends BaseModule
         * dealings with their own node so a TOS is not necessary.
         *
         **/
-       public static function init()
+       public function init()
        {
                if (strlen(DI::config()->get('system','singleuser'))) {
                        DI::baseUrl()->redirect('profile/' . DI::config()->get('system','singleuser'));
@@ -79,7 +79,7 @@ class Tos extends BaseModule
         * @return string
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function content() {
+       public function content(): string {
                $tpl = Renderer::getMarkupTemplate('tos.tpl');
                if (DI::config()->get('system', 'tosdisplay')) {
                        return Renderer::replaceMacros($tpl, [
index 84d2b3a9fcb1e763329a01898d4f67b6e99ad42a..f42274953d83e93cd228153e5df6c8360eb53302 100644 (file)
@@ -33,7 +33,7 @@ use Friendica\Module\Conversation\Community as CommunityModule;
  */
 class Community extends CommunityModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                self::parseRequest();
 
index c6e5225d6fb32b88230b3eb76a5a1ac41ba15103..a1a120ea27dce40c5fcce6c76d3f69ba187f269c 100644 (file)
@@ -9,7 +9,7 @@ use Friendica\Module\Conversation\Network as NetworkModule;
 
 class Network extends NetworkModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                if (!isset($_GET['p']) || !isset($_GET['item'])) {
                        exit();
index 2e9f676f83d7d8a6ee3217810cab760e95f0368b..b06aea804449f5218d302866c0e5198a27dfe4cb 100644 (file)
@@ -35,7 +35,7 @@ use Friendica\Util\DateTimeFormat;
 
 class Profile extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                $a = DI::app();
 
index c14df0160a029d2269ebd03baea7042d9a57ba64..92845cdaffc928a9f8829a09818551dad1aeacb4 100644 (file)
@@ -30,7 +30,7 @@ use Friendica\DI;
  */
 class Welcome extends BaseModule
 {
-       public static function content()
+       public function content(): string
        {
                $config = DI::config();
 
index 14a3a17fe5a72de81a185a17502ae9032f79f705..a65b4db1a15e2580856b9482c20d02226288fd04 100644 (file)
@@ -33,7 +33,7 @@ use Friendica\Util\Crypto;
  */
 class HostMeta extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                $config = DI::config();
 
index f1d8164cb98cce05ae08fa842889725abf966f0e..a4197928067eedfeb0483407ba36ba541e39ea8e 100644 (file)
@@ -30,7 +30,7 @@ use Friendica\DI;
  */
 class NodeInfo extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                self::printWellKnown();
        }
index 317db50feb3acdf18b44dbc370b2da6c6fd6a04e..73a627c2e7953d1c8d99c0a73de9983a8363d3e1 100644 (file)
@@ -29,7 +29,7 @@ use Friendica\BaseModule;
  */
 class SecurityTxt extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                $name = 'security.txt';
                $fp = fopen($name, 'rt');
index a66feac039eaa2a44842b89df9ff5f8f318f11b8..c401825236c72907829d9e096fc5e8dd2c68d797 100644 (file)
@@ -32,7 +32,7 @@ use Friendica\Protocol\Relay;
  */
 class XSocialRelay extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                $config = DI::config();
 
index 459059a55f2e47829d318397cda42166f7b4f6a9..4a8e32e8eaa91b9a4c5321b7420be0aca13a98b0 100644 (file)
@@ -36,7 +36,7 @@ use Friendica\Protocol\Salmon;
  */
 class Xrd extends BaseModule
 {
-       public static function rawContent()
+       public function rawContent()
        {
                // @TODO: Replace with parameter from router
                if (DI::args()->getArgv()[0] == 'xrd') {
index 7f5d65fcf14b509a38c4d9fd47cf6d53b1ab4163..65e0873c10bc23b779c4cef788448a0a95ddec85 100644 (file)
@@ -197,7 +197,7 @@ class ModuleTest extends DatabaseTest
 
                $module = (new App\Module($name))->determineClass(new App\Arguments('', $command), $router, $config, $dice);
 
-               self::assertEquals($assert, $module->getClass()::getClassName());
+               self::assertEquals($assert, $module->getClass()->getClassName());
        }
 
        /**