]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Post/Edit.php
Use the post language for the language detection / config for quality
[friendica.git] / src / Module / Post / Edit.php
index ed5ce00628d3a3c4feb7ed37d54f4dd0431b45ab..1505c301acf9b03473a8f93827d3cb64c57104b5 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -82,8 +82,10 @@ class Edit extends BaseModule
                        $this->errorExit($this->t('Post not found.'), HTTPException\BadRequestException::class);
                }
 
-               $fields = ['allow_cid', 'allow_gid', 'deny_cid', 'deny_gid',
-                                  'body', 'title', 'uri-id', 'wall', 'post-type', 'guid'];
+               $fields = [
+                       'allow_cid', 'allow_gid', 'deny_cid', 'deny_gid', 'gravity',
+                       'body', 'title', 'uri-id', 'wall', 'post-type', 'guid'
+               ];
 
                $item = Post::selectFirstForUser($this->session->getLocalUserId(), $fields, [
                        'id'  => $postId,
@@ -102,6 +104,7 @@ class Edit extends BaseModule
 
                $this->page['htmlhead'] .= Renderer::replaceMacros(Renderer::getMarkupTemplate('jot-header.tpl'), [
                        '$ispublic'  => '&nbsp;',
+                       '$geotag'    => '',
                        '$nickname'  => $this->app->getLoggedInUserNickname(),
                        '$is_mobile' => $this->mode->isMobile(),
                ]);
@@ -112,6 +115,9 @@ class Edit extends BaseModule
                        $lockstate = 'unlock';
                }
 
+               $item['body'] = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body']);
+               $item = Post\Media::addHTMLAttachmentToItem($item);
+
                $jotplugins = '';
 
                Hook::callAll('jot_tool', $jotplugins);
@@ -166,6 +172,7 @@ class Edit extends BaseModule
                        '$editalic' => $this->t('Italic'),
                        '$eduline'  => $this->t('Underline'),
                        '$edquote'  => $this->t('Quote'),
+                       '$edemojis' => $this->t('Add emojis'),
                        '$edcode'   => $this->t('Code'),
                        '$edurl'    => $this->t('Link'),
                        '$edattach' => $this->t('Link or Media'),