mirror of
https://github.com/friendica/friendica
synced 2025-04-29 09:04:24 +02: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
|
@ -38,18 +38,18 @@ use Friendica\Network\HTTPException;
|
|||
*/
|
||||
class Activity extends BaseModule
|
||||
{
|
||||
public static function rawContent(array $parameters = [])
|
||||
public static function rawContent()
|
||||
{
|
||||
if (!Session::isAuthenticated()) {
|
||||
throw new HTTPException\ForbiddenException();
|
||||
}
|
||||
|
||||
if (empty($parameters['id']) || empty($parameters['verb'])) {
|
||||
if (empty(static::$parameters['id']) || empty(static::$parameters['verb'])) {
|
||||
throw new HTTPException\BadRequestException();
|
||||
}
|
||||
|
||||
$verb = $parameters['verb'];
|
||||
$itemId = $parameters['id'];
|
||||
$verb = static::$parameters['verb'];
|
||||
$itemId = static::$parameters['id'];
|
||||
|
||||
if (in_array($verb, ['announce', 'unannounce'])) {
|
||||
$item = Post::selectFirst(['network'], ['id' => $itemId]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue