X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fitem.php;h=66ab1c210b9d2acaaa55b2f3fa3d04d21e527193;hb=1fdd0f915250517e254adb5165b394f03721cd87;hp=c1740c274f8d4b7e9f819cb7502ba70fbd013967;hpb=f4b5d22396a542405ca6b999d266d20830d6bd5f;p=friendica.git diff --git a/mod/item.php b/mod/item.php index c1740c274f..66ab1c210b 100644 --- a/mod/item.php +++ b/mod/item.php @@ -19,7 +19,7 @@ * * This is the POST destination for most all locally posted * text stuff. This function handles status, wall-to-wall status, - * local comments, and remote coments that are posted on this site + * local comments, and remote comments that are posted on this site * (as opposed to being delivered in a feed). * Also processed here are posts and comments coming through the * statusnet/twitter API. @@ -29,6 +29,7 @@ */ use Friendica\App; +use Friendica\Content\Conversation; use Friendica\Content\Text\BBCode; use Friendica\Core\Hook; use Friendica\Core\Logger; @@ -40,10 +41,8 @@ use Friendica\DI; use Friendica\Model\Contact; use Friendica\Model\Item; use Friendica\Model\ItemURI; -use Friendica\Model\Photo; use Friendica\Model\Post; use Friendica\Network\HTTPException; -use Friendica\Protocol\Activity; use Friendica\Util\DateTimeFormat; function item_post(App $a) { @@ -107,6 +106,7 @@ function item_edit(int $uid, array $request, bool $preview, string $return_path) $post['edit'] = $post; $post['file'] = Post\Category::getTextByURIId($post['uri-id'], $post['uid']); + Post\Media::deleteByURIId($post['uri-id'], [Post\Media::AUDIO, Post\Media::VIDEO, Post\Media::IMAGE, Post\Media::HTML]); $post = item_process($post, $request, $preview, $return_path); $fields = [ @@ -274,7 +274,7 @@ function item_process(array $post, array $request, bool $preview, string $return $post['body'] = BBCode::removeSharedData(Item::setHashtags($post['body'])); $post['writable'] = true; - $o = DI::conversation()->create([$post], 'search', false, true); + $o = DI::conversation()->create([$post], Conversation::MODE_SEARCH, false, true); System::jsonExit(['preview' => $o]); }