mirror of
https://github.com/friendica/friendica
synced 2025-04-20 19:10:11 +00:00
Replace $parameters
argument per method with static::$parameters
This commit is contained in:
parent
018275919c
commit
714f0febc4
249 changed files with 710 additions and 775 deletions
|
@ -31,17 +31,17 @@ use Friendica\Network\HTTPException;
|
|||
*/
|
||||
class ItemBody extends BaseModule
|
||||
{
|
||||
public static function content(array $parameters = [])
|
||||
public static function content()
|
||||
{
|
||||
if (!local_user()) {
|
||||
throw new HTTPException\UnauthorizedException(DI::l10n()->t('Access denied.'));
|
||||
}
|
||||
|
||||
if (empty($parameters['item'])) {
|
||||
if (empty(static::$parameters['item'])) {
|
||||
throw new HTTPException\NotFoundException(DI::l10n()->t('Item not found.'));
|
||||
}
|
||||
|
||||
$itemId = intval($parameters['item']);
|
||||
$itemId = intval(static::$parameters['item']);
|
||||
|
||||
$item = Post::selectFirst(['body'], ['uid' => [0, local_user()], 'uri-id' => $itemId]);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue