X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FContact%2FPoke.php;h=23ec95a435ff9f60c96f9d5dad117e9263f48481;hb=89d6c89b6775bc37340dd93d747022e2d7db9618;hp=7f3e596db7f89d64c4d3739d7cd75314b2896598;hpb=714f0febc4918f5569eb09f8800b6739cff36347;p=friendica.git diff --git a/src/Module/Contact/Poke.php b/src/Module/Contact/Poke.php index 7f3e596db7..23ec95a435 100644 --- a/src/Module/Contact/Poke.php +++ b/src/Module/Contact/Poke.php @@ -18,9 +18,9 @@ use Friendica\Util\XML; class Poke extends BaseModule { - public static function post() + public function post() { - if (!local_user() || empty(static::$parameters['id'])) { + if (!local_user() || empty($this->parameters['id'])) { return self::postReturn(false); } @@ -39,14 +39,14 @@ class Poke extends BaseModule $activity = Activity::POKE . '#' . urlencode($verbs[$verb][0]); - $contact_id = intval(static::$parameters['id']); + $contact_id = intval($this->parameters['id']); if (!$contact_id) { return self::postReturn(false); } Logger::info('verb ' . $verb . ' contact ' . $contact_id); - $contact = DBA::selectFirst('contact', ['id', 'name', 'url', 'photo'], ['id' => static::$parameters['id'], 'uid' => local_user()]); + $contact = DBA::selectFirst('contact', ['id', 'name', 'url', 'photo'], ['id' => $this->parameters['id'], 'uid' => local_user()]); if (!DBA::isResult($contact)) { return self::postReturn(false); } @@ -123,17 +123,17 @@ class Poke extends BaseModule return $success; } - public static function content() + public function content(): string { if (!local_user()) { throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this module.')); } - if (empty(static::$parameters['id'])) { + if (empty($this->parameters['id'])) { throw new HTTPException\BadRequestException(); } - $contact = DBA::selectFirst('contact', ['id', 'url', 'name'], ['id' => static::$parameters['id'], 'uid' => local_user()]); + $contact = DBA::selectFirst('contact', ['id', 'url', 'name'], ['id' => $this->parameters['id'], 'uid' => local_user()]); if (!DBA::isResult($contact)) { throw new HTTPException\NotFoundException(); }