X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FProfile%2FProfile.php;h=199b96e2c976e4f10b8ff69b5f5e42da1583e310;hb=69b7923df2beed71419bc38e61ca9755fad24b12;hp=c1792ad4e6980e47a112c6c4853dfe1efea3fda2;hpb=714f0febc4918f5569eb09f8800b6739cff36347;p=friendica.git
diff --git a/src/Module/Profile/Profile.php b/src/Module/Profile/Profile.php
index c1792ad4e6..199b96e2c9 100644
--- a/src/Module/Profile/Profile.php
+++ b/src/Module/Profile/Profile.php
@@ -1,6 +1,6 @@
static::$parameters['nickname']]);
+ $user = DBA::selectFirst('user', ['uid'], ['nickname' => $this->parameters['nickname']]);
if (DBA::isResult($user)) {
try {
$data = ActivityPub\Transmitter::getProfile($user['uid']);
@@ -61,9 +61,9 @@ class Profile extends BaseProfile
}
}
- if (DBA::exists('userd', ['username' => static::$parameters['nickname']])) {
+ if (DBA::exists('userd', ['username' => $this->parameters['nickname']])) {
// Known deleted user
- $data = ActivityPub\Transmitter::getDeletedUser(static::$parameters['nickname']);
+ $data = ActivityPub\Transmitter::getDeletedUser($this->parameters['nickname']);
System::jsonError(410, $data);
} else {
@@ -73,11 +73,11 @@ class Profile extends BaseProfile
}
}
- public static function content()
+ protected function content(array $request = []): string
{
$a = DI::app();
- $profile = ProfileModel::load($a, static::$parameters['nickname']);
+ $profile = ProfileModel::load($a, $this->parameters['nickname']);
if (!$profile) {
throw new HTTPException\NotFoundException(DI::l10n()->t('Profile not found.'));
}
@@ -98,7 +98,7 @@ class Profile extends BaseProfile
DI::page()['htmlhead'] .= '' . "\n";
}
- DI::page()['htmlhead'] .= self::buildHtmlHead($profile, static::$parameters['nickname'], $remote_contact_id);
+ DI::page()['htmlhead'] .= self::buildHtmlHead($profile, $this->parameters['nickname'], $remote_contact_id);
Nav::setSelected('home');
@@ -134,7 +134,7 @@ class Profile extends BaseProfile
$view_as_contact_alert = DI::l10n()->t(
'You\'re currently viewing your profile as %s Cancel',
htmlentities($view_as_contacts[$key]['name'], ENT_COMPAT, 'UTF-8'),
- 'profile/' . static::$parameters['nickname'] . '/profile'
+ 'profile/' . $this->parameters['nickname'] . '/profile'
);
}
}