X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Feditpost.php;h=cc72dbd3c2eddbd864b28250254b6467d96ce32d;hb=3972fe62fe8afb3791e9d6526e7665501a577b81;hp=8ef15208457afe333e785401e7fb788a74d17e68;hpb=a5cce36c44c83cb0f42b9a5c760f6e78629d898f;p=friendica.git diff --git a/mod/editpost.php b/mod/editpost.php index 8ef1520845..cc72dbd3c2 100644 --- a/mod/editpost.php +++ b/mod/editpost.php @@ -1,6 +1,6 @@ argc > 1) ? intval($a->argv[1]) : 0); + $post_id = ((DI::args()->getArgc() > 1) ? intval(DI::args()->getArgv()[1]) : 0); if (!$post_id) { notice(DI::l10n()->t('Item not found')); @@ -55,6 +56,8 @@ function editpost_content(App $a) return; } + $user = User::getById(local_user()); + $geotag = ''; $o .= Renderer::replaceMacros(Renderer::getMarkupTemplate("section_title.tpl"), [ @@ -65,7 +68,7 @@ function editpost_content(App $a) DI::page()['htmlhead'] .= Renderer::replaceMacros($tpl, [ '$ispublic' => ' ', // DI::l10n()->t('Visible to everybody'), '$geotag' => $geotag, - '$nickname' => $a->user['nickname'], + '$nickname' => $a->getLoggedInUserNickname(), '$is_mobile' => DI::mode()->isMobile(), ]); @@ -107,7 +110,7 @@ function editpost_content(App $a) '$posttype' => $item['post-type'], '$content' => undo_post_tagging($item['body']), '$post_id' => $post_id, - '$defloc' => $a->user['default-location'], + '$defloc' => $user['default-location'], '$visitor' => 'none', '$pvisit' => 'none', '$emailcc' => DI::l10n()->t('CC: email addresses'), @@ -124,7 +127,6 @@ function editpost_content(App $a) '$profile_uid' => $_SESSION['uid'], '$preview' => DI::l10n()->t('Preview'), '$jotplugins' => $jotplugins, - '$sourceapp' => DI::l10n()->t($a->sourcename), '$cancel' => DI::l10n()->t('Cancel'), '$rand_num' => Crypto::randomDigits(12),