<?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
*
*/
class ItemBody extends BaseModule
{
- public function content(): string
+ protected function content(array $request = []): string
{
if (!local_user()) {
throw new HTTPException\UnauthorizedException(DI::l10n()->t('Access denied.'));
}
- if (empty(static::$parameters['item'])) {
+ if (empty($this->parameters['item'])) {
throw new HTTPException\NotFoundException(DI::l10n()->t('Item not found.'));
}
- $itemId = intval(static::$parameters['item']);
+ $itemId = intval($this->parameters['item']);
$item = Post::selectFirst(['body'], ['uid' => [0, local_user()], 'uri-id' => $itemId]);