Replace $parameters argument per method with static::$parameters
This commit is contained in:
@@ -38,7 +38,7 @@ use Friendica\Network\HTTPException;
|
||||
*/
|
||||
class Notify extends BaseModule
|
||||
{
|
||||
public static function post(array $parameters = [])
|
||||
public static function post()
|
||||
{
|
||||
$postdata = Network::postdata();
|
||||
|
||||
@@ -47,8 +47,8 @@ class Notify extends BaseModule
|
||||
}
|
||||
|
||||
$data = json_decode($postdata);
|
||||
if (is_object($data) && !empty($parameters['nickname'])) {
|
||||
$user = User::getByNickname($parameters['nickname']);
|
||||
if (is_object($data) && !empty(static::$parameters['nickname'])) {
|
||||
$user = User::getByNickname(static::$parameters['nickname']);
|
||||
if (empty($user)) {
|
||||
throw new \Friendica\Network\HTTPException\InternalServerErrorException();
|
||||
}
|
||||
|
||||
@@ -29,11 +29,11 @@ use Friendica\Protocol\OStatus;
|
||||
*/
|
||||
class Poll extends BaseModule
|
||||
{
|
||||
public static function rawContent(array $parameters = [])
|
||||
public static function rawContent()
|
||||
{
|
||||
header("Content-type: application/atom+xml");
|
||||
$last_update = $_GET['last_update'] ?? '';
|
||||
echo OStatus::feed($parameters['nickname'], $last_update, 10);
|
||||
echo OStatus::feed(static::$parameters['nickname'], $last_update, 10);
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user