From e1dac1a87a200623933cc36949c0bc0065882afc Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 15 Jun 2020 03:43:51 +0000 Subject: [PATCH] Categories are not showing up at the bottom of the post Fixes friendica/friendica#8766 --- src/Model/Post/Category.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/Model/Post/Category.php b/src/Model/Post/Category.php index d4a8469d4f..29bc70401c 100644 --- a/src/Model/Post/Category.php +++ b/src/Model/Post/Category.php @@ -73,15 +73,13 @@ class Category public static function storeTextByURIId(int $uri_id, int $uid, string $files) { $message = Item::selectFirst(['deleted'], ['uri-id' => $uri_id, 'uid' => $uid]); - if (!DBA::isResult($message)) { - return; - } + if (DBA::isResult($message)) { + // Clean up all tags + DBA::delete('post-category', ['uri-id' => $uri_id, 'uid' => $uid]); - // Clean up all tags - DBA::delete('post-category', ['uri-id' => $uri_id, 'uid' => $uid]); - - if ($message['deleted']) { - return; + if ($message['deleted']) { + return; + } } if (preg_match_all("/\[(.*?)\]/ism", $files, $result)) {