X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Feditpost.php;h=9f9041811e3875a7b2e52f3d7892cc6fa2f91b1e;hb=1ff6b1cf1846ae3c0c8cfe8c9366e3d3ed5cf52d;hp=31f121bd546150f62563c77bb0657d765ccc8ec6;hpb=8a3995a740a109b2bcac9b88fee6ecc55dd97c85;p=friendica.git diff --git a/mod/editpost.php b/mod/editpost.php index 31f121bd54..9f9041811e 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')); @@ -46,7 +47,7 @@ function editpost_content(App $a) } $fields = ['allow_cid', 'allow_gid', 'deny_cid', 'deny_gid', - 'type', 'body', 'title', 'uri-id', 'wall', 'post-type', 'guid']; + 'body', 'title', 'uri-id', 'wall', 'post-type', 'guid']; $item = Post::selectFirstForUser(local_user(), $fields, ['id' => $post_id, 'uid' => local_user()]); @@ -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,10 +127,18 @@ 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), + // Formatting button labels + '$edbold' => DI::l10n()->t('Bold'), + '$editalic' => DI::l10n()->t('Italic'), + '$eduline' => DI::l10n()->t('Underline'), + '$edquote' => DI::l10n()->t('Quote'), + '$edcode' => DI::l10n()->t('Code'), + '$edurl' => DI::l10n()->t('Link'), + '$edattach' => DI::l10n()->t('Link or Media'), + //jot nav tab (used in some themes) '$message' => DI::l10n()->t('Message'), '$browser' => DI::l10n()->t('Browser'),