mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-12 01:54:26 +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
|
@ -46,10 +46,10 @@ use Friendica\Util\Temporal;
|
|||
|
||||
class Profile extends BaseProfile
|
||||
{
|
||||
public static function rawContent(array $parameters = [])
|
||||
public static function rawContent()
|
||||
{
|
||||
if (ActivityPub::isRequest()) {
|
||||
$user = DBA::selectFirst('user', ['uid'], ['nickname' => $parameters['nickname']]);
|
||||
$user = DBA::selectFirst('user', ['uid'], ['nickname' => static::$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' => $parameters['nickname']])) {
|
||||
if (DBA::exists('userd', ['username' => static::$parameters['nickname']])) {
|
||||
// Known deleted user
|
||||
$data = ActivityPub\Transmitter::getDeletedUser($parameters['nickname']);
|
||||
$data = ActivityPub\Transmitter::getDeletedUser(static::$parameters['nickname']);
|
||||
|
||||
System::jsonError(410, $data);
|
||||
} else {
|
||||
|
@ -73,11 +73,11 @@ class Profile extends BaseProfile
|
|||
}
|
||||
}
|
||||
|
||||
public static function content(array $parameters = [])
|
||||
public static function content()
|
||||
{
|
||||
$a = DI::app();
|
||||
|
||||
$profile = ProfileModel::load($a, $parameters['nickname']);
|
||||
$profile = ProfileModel::load($a, static::$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'] .= '<meta name="friendica.community" content="true" />' . "\n";
|
||||
}
|
||||
|
||||
DI::page()['htmlhead'] .= self::buildHtmlHead($profile, $parameters['nickname'], $remote_contact_id);
|
||||
DI::page()['htmlhead'] .= self::buildHtmlHead($profile, static::$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 <b>%s</b> <a href="%s" class="btn btn-sm pull-right">Cancel</a>',
|
||||
htmlentities($view_as_contacts[$key]['name'], ENT_COMPAT, 'UTF-8'),
|
||||
'profile/' . $parameters['nickname'] . '/profile'
|
||||
'profile/' . static::$parameters['nickname'] . '/profile'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue