Changed function name

This commit is contained in:
Michael 2021-08-09 15:29:07 +00:00
commit b8fa75b2dd
34 changed files with 54 additions and 54 deletions

View file

@ -62,7 +62,7 @@ function display_init(App $a)
if (local_user()) {
$item = Post::selectFirstForUser(local_user(), $fields, ['guid' => DI::args()->getArgv()[1], 'uid' => local_user()]);
if (DBA::isResult($item)) {
$nick = $a->getNickname();
$nick = $a->getUserNickname();
}
}

View file

@ -68,7 +68,7 @@ function editpost_content(App $a)
DI::page()['htmlhead'] .= Renderer::replaceMacros($tpl, [
'$ispublic' => '&nbsp;', // DI::l10n()->t('Visible to <strong>everybody</strong>'),
'$geotag' => $geotag,
'$nickname' => $a->getNickname(),
'$nickname' => $a->getUserNickname(),
'$is_mobile' => DI::mode()->isMobile(),
]);

View file

@ -280,7 +280,7 @@ function events_content(App $a)
$tabs = '';
// tabs
if ($a->getThemeInfoValue('events_in_profile')) {
$tabs = BaseProfile::getTabsHTML($a, 'events', true, $a->getNickname(), false);
$tabs = BaseProfile::getTabsHTML($a, 'events', true, $a->getUserNickname(), false);
}
$mode = 'view';

View file

@ -88,7 +88,7 @@ function fbrowser_content(App $a)
}
return [
DI::baseUrl() . '/photos/' . $a->getNickname() . '/image/' . $rr['resource-id'],
DI::baseUrl() . '/photos/' . $a->getUserNickname() . '/image/' . $rr['resource-id'],
$filename_e,
DI::baseUrl() . '/photo/' . $rr['resource-id'] . '-' . $scale . '.'. $ext
];
@ -103,7 +103,7 @@ function fbrowser_content(App $a)
'$folders' => $albums,
'$files' => $files,
'$cancel' => DI::l10n()->t('Cancel'),
'$nickname' => $a->getNickname(),
'$nickname' => $a->getUserNickname(),
'$upload' => DI::l10n()->t('Upload')
]);
@ -132,7 +132,7 @@ function fbrowser_content(App $a)
'$folders' => false,
'$files' => $files,
'$cancel' => DI::l10n()->t('Cancel'),
'$nickname' => $a->getNickname(),
'$nickname' => $a->getUserNickname(),
'$upload' => DI::l10n()->t('Upload')
]);
}

View file

@ -175,7 +175,7 @@ function follow_process(App $a, string $url)
{
$return_path = 'follow?url=' . urlencode($url);
$result = Contact::createFromProbe($a->getUserId(), $url);
$result = Contact::createFromProbeForUser($a->getUserId(), $url);
if ($result['success'] == false) {
// Possibly it is a remote item and not an account

View file

@ -112,7 +112,7 @@ function message_content(App $a)
return Login::form();
}
$myprofile = DI::baseUrl() . '/profile/' . $a->getNickname();
$myprofile = DI::baseUrl() . '/profile/' . $a->getUserNickname();
$tpl = Renderer::getMarkupTemplate('mail_head.tpl');
if (DI::args()->getArgc() > 1 && DI::args()->getArgv()[1] == 'new') {
@ -179,7 +179,7 @@ function message_content(App $a)
$tpl = Renderer::getMarkupTemplate('msg-header.tpl');
DI::page()['htmlhead'] .= Renderer::replaceMacros($tpl, [
'$baseurl' => DI::baseUrl()->get(true),
'$nickname' => $a->getNickname(),
'$nickname' => $a->getUserNickname(),
'$linkurl' => DI::l10n()->t('Please enter a link URL:')
]);
@ -292,7 +292,7 @@ function message_content(App $a)
$tpl = Renderer::getMarkupTemplate('msg-header.tpl');
DI::page()['htmlhead'] .= Renderer::replaceMacros($tpl, [
'$baseurl' => DI::baseUrl()->get(true),
'$nickname' => $a->getNickname(),
'$nickname' => $a->getUserNickname(),
'$linkurl' => DI::l10n()->t('Please enter a link URL:')
]);
@ -431,7 +431,7 @@ function render_messages(array $msg, $t)
$tpl = Renderer::getMarkupTemplate($t);
$rslt = '';
$myprofile = DI::baseUrl() . '/profile/' . $a->getNickname();
$myprofile = DI::baseUrl() . '/profile/' . $a->getUserNickname();
foreach ($msg as $rr) {
if ($rr['unknown']) {

View file

@ -45,7 +45,7 @@ function notes_content(App $a, $update = false)
return;
}
$o = BaseProfile::getTabsHTML($a, 'notes', true, $a->getNickname(), false);
$o = BaseProfile::getTabsHTML($a, 'notes', true, $a->getUserNickname(), false);
if (!$update) {
$o .= '<h3>' . DI::l10n()->t('Personal Notes') . '</h3>';

View file

@ -111,7 +111,7 @@ function ostatus_subscribe_content(App $a)
$probed = Contact::getByURL($url);
if (in_array($probed['network'], Protocol::FEDERATED)) {
$result = Contact::createFromProbe($a->getUserId(), $probed['url']);
$result = Contact::createFromProbeForUser($a->getUserId(), $probed['url']);
if ($result['success']) {
$o .= ' - ' . DI::l10n()->t('success');
} else {

View file

@ -224,7 +224,7 @@ function photos_post(App $a)
// Update the photo albums cache
Photo::clearAlbumCache($page_owner_uid);
DI::baseUrl()->redirect('photos/' . $a->getNickname() . '/album/' . bin2hex($newalbum));
DI::baseUrl()->redirect('photos/' . $a->getUserNickname() . '/album/' . bin2hex($newalbum));
return; // NOTREACHED
}

View file

@ -193,7 +193,7 @@ function ping_init(App $a)
$intro_count = count($intros1) + count($intros2);
$intros = $intros1 + $intros2;
$myurl = DI::baseUrl() . '/profile/' . $a->getNickname();
$myurl = DI::baseUrl() . '/profile/' . $a->getUserNickname();
$mails = q(
"SELECT `id`, `from-name`, `from-url`, `from-photo`, `created` FROM `mail`
WHERE `uid` = %d AND `seen` = 0 AND `from-url` != '%s' ",

View file

@ -70,7 +70,7 @@ function repair_ostatus_content(App $a) {
$o .= "<p>".DI::l10n()->t("Keep this window open until done.")."</p>";
Contact::createFromProbe($a->getUserId(), $r[0]["url"]);
Contact::createFromProbeForUser($a->getUserId(), $r[0]["url"]);
DI::page()['htmlhead'] = '<meta http-equiv="refresh" content="1; URL=' . DI::baseUrl() . '/repair_ostatus?counter='.$counter.'">';

View file

@ -594,7 +594,7 @@ function settings_content(App $a)
$username = $user['username'];
$email = $user['email'];
$nickname = $a->getNickname();
$nickname = $a->getUserNickname();
$timezone = $user['timezone'];
$language = $user['language'];
$notify = $user['notify-flags'];