]> git.mxchange.org Git - friendica.git/commitdiff
Categories are not showing up at the bottom of the post
authorMichael <heluecht@pirati.ca>
Mon, 15 Jun 2020 03:43:51 +0000 (03:43 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 15 Jun 2020 03:43:51 +0000 (03:43 +0000)
Fixes friendica/friendica#8766

src/Model/Post/Category.php

index d4a8469d4fd6478259ed6cb9a74159d1091c45ca..29bc70401c3013dcecd3ec3782cab0035197e50d 100644 (file)
@@ -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;
-               }
-
-               // Clean up all tags
-               DBA::delete('post-category', ['uri-id' => $uri_id, 'uid' => $uid]);
+               if (DBA::isResult($message)) {
+                       // 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)) {