X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fitem.php;h=f164fb0ae2c6f4347225dd08ab112cdcd66ee1b4;hb=af39296f0640bc40e58f51ec47c4e5aa53a24316;hp=1bbc08527953cc76cad4b2f680670ddb14317fc8;hpb=3086666c38e6595d2254a08534668b900524927f;p=friendica.git diff --git a/mod/item.php b/mod/item.php index 1bbc085279..f164fb0ae2 100644 --- a/mod/item.php +++ b/mod/item.php @@ -576,7 +576,7 @@ function item_post(App $a) { $notify_type = ($parent ? 'comment-new' : 'wall-new'); - $uri = ($message_id ? $message_id : item_new_uri($a->get_hostname(), $profile_uid, $guid)); + $uri = ($message_id ? $message_id : Item::newURI($profile_uid, $guid)); // Fallback so that we alway have a parent uri if (!$thr_parent_uri || !$parent) { @@ -661,6 +661,11 @@ function item_post(App $a) { $datarray['edit'] = true; } + // Check for hashtags in the body and repair or add hashtag links + if ($preview || $orig_post) { + Item::setHashtags($datarray); + } + // preview mode - prepare the body for display and send it via json if ($preview) { require_once 'include/conversation.php'; @@ -872,7 +877,7 @@ function item_content(App $a) { $o = ''; if (($a->argc == 3) && ($a->argv[1] === 'drop') && intval($a->argv[2])) { if (is_ajax()) { - $o = Item::deleteById($a->argv[2]); + $o = Item::deleteForUser(['id' => $a->argv[2]], local_user()); } else { $o = drop_item($a->argv[2]); }