]> git.mxchange.org Git - friendica.git/commitdiff
Include other unique key column in condition in Model\Tag:store
authorHypolite Petovan <hypolite@mrpetovan.com>
Mon, 9 Jan 2023 14:52:04 +0000 (09:52 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 9 Jan 2023 21:06:22 +0000 (16:06 -0500)
- Address https://github.com/friendica/friendica/issues/12486#issuecomment-1372640002

src/Model/Tag.php

index 368be55ddd28f3a4f100c6b63d21b972fce7f742..8509c309387aa670db010de3b97a8ccc4e862a77 100644 (file)
@@ -119,7 +119,7 @@ class Tag
                                $tag = DBA::selectFirst('tag', ['name', 'type'], ['url' => $url]);
                                if (!empty($tag)) {
                                        if ($tag['name'] != substr($name, 0, 96)) {
-                                               DBA::update('tag', ['name' => substr($name, 0, 96)], ['url' => $url]);
+                                               DBA::update('tag', ['name' => substr($name, 0, 96)], ['url' => $url, 'type' => $tag['type']]);
                                        }
                                        if (!empty($target) && ($tag['type'] != $target)) {
                                                DBA::update('tag', ['type' => $target], ['url' => $url]);