From 2ca80118bf4fd4c0455f45b2310d040739ad8f4c Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 6 May 2022 19:10:28 +0000 Subject: more cleanup --- Zotlabs/Module/Item.php | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'Zotlabs/Module/Item.php') diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php index 7bf8b21d5..e1ba2b2f0 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -743,6 +743,8 @@ class Item extends Controller { $webpage = $parent_item['item_type']; } + + if ((!$allow_empty) && (!strlen($body))) { if ($preview) killme(); @@ -807,7 +809,6 @@ class Item extends Controller { $post_tags = []; - if ($mimetype === 'text/bbcode') { require_once('include/text.php'); @@ -919,15 +920,7 @@ class Item extends Controller { $cats = explode(',', $categories); foreach ($cats as $cat) { - if ($webpage == ITEM_TYPE_CARD) { - $catlink = z_root() . '/cards/' . $channel['channel_address'] . '?f=&cat=' . urlencode(trim($cat)); - } - elseif ($webpage == ITEM_TYPE_ARTICLE) { - $catlink = z_root() . '/articles/' . $channel['channel_address'] . '?f=&cat=' . urlencode(trim($cat)); - } - else { - $catlink = $owner_xchan['xchan_url'] . '?f=&cat=' . urlencode(trim($cat)); - } + $catlink = $owner_xchan['xchan_url'] . '?f=&cat=' . urlencode(trim($cat)); $post_tags[] = [ 'uid' => $profile_uid, -- cgit v1.2.3