Switch static::$parameters to $this->parameters

This commit is contained in:
Philipp 2021-11-14 23:19:25 +01:00
parent 489cd0884a
commit 5879535822
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
116 changed files with 321 additions and 314 deletions

View file

@ -49,17 +49,17 @@ class Activity extends BaseApi
'id' => 0, // Id of the post
]);
$res = Item::performActivity($request['id'], static::$parameters['verb'], $uid);
$res = Item::performActivity($request['id'], $this->parameters['verb'], $uid);
if ($res) {
if (!empty(static::$parameters['extension']) && (static::$parameters['extension'] == 'xml')) {
if (!empty($this->parameters['extension']) && ($this->parameters['extension'] == 'xml')) {
$ok = 'true';
} else {
$ok = 'ok';
}
DI::apiResponse()->exit('ok', ['ok' => $ok], static::$parameters['extension'] ?? null);
DI::apiResponse()->exit('ok', ['ok' => $ok], $this->parameters['extension'] ?? null);
} else {
DI::apiResponse()->error(500, 'Error adding activity', '', static::$parameters['extension'] ?? null);
DI::apiResponse()->error(500, 'Error adding activity', '', $this->parameters['extension'] ?? null);
}
}
}