]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Debug/ItemBody.php
We now offer an endpoint for featured posts
[friendica.git] / src / Module / Debug / ItemBody.php
index 2299b3cb21302dfc9ddd8a871efb1ccec292c079..55abc894ed736d263bb0399ea41fb58ec98e635b 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -31,17 +31,17 @@ use Friendica\Network\HTTPException;
  */
 class ItemBody extends BaseModule
 {
-       public static function content(array $parameters = [])
+       protected function content(array $request = []): string
        {
                if (!local_user()) {
                        throw new HTTPException\UnauthorizedException(DI::l10n()->t('Access denied.'));
                }
 
-               if (empty($parameters['item'])) {
+               if (empty($this->parameters['item'])) {
                        throw new HTTPException\NotFoundException(DI::l10n()->t('Item not found.'));
                }
 
-               $itemId = intval($parameters['item']);
+               $itemId = intval($this->parameters['item']);
 
                $item = Post::selectFirst(['body'], ['uid' => [0, local_user()], 'uri-id' => $itemId]);