]> git.mxchange.org Git - friendica.git/blobdiff - mod/editpost.php
Merge pull request #11224 from annando/statistics-separator
[friendica.git] / mod / editpost.php
index 848e1ce862706dce946548db2d03d50330fc3cce..ae5f55e9052df6ced69f18abc1e924a00f53a92d 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -27,6 +27,7 @@ use Friendica\Database\DBA;
 use Friendica\DI;
 use Friendica\Model\Contact;
 use Friendica\Model\Post;
+use Friendica\Model\User;
 use Friendica\Util\Crypto;
 
 function editpost_content(App $a)
@@ -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' => '&nbsp;', // DI::l10n()->t('Visible to <strong>everybody</strong>'),
                '$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'),
@@ -127,6 +130,15 @@ function editpost_content(App $a)
                '$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'),