X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Ftagrm.php;h=e81bd2af38940439120b16c9d9928c5388cb8636;hb=1849bf0a120e236624ddc25461f424071ab8c8a2;hp=7e8ae8524b92a78a8be0a4cddfcc3549e62766a6;hpb=49db63da2b11ce899639f9c1b53e1f47a456c822;p=friendica.git diff --git a/mod/tagrm.php b/mod/tagrm.php index 7e8ae8524b..e81bd2af38 100644 --- a/mod/tagrm.php +++ b/mod/tagrm.php @@ -1,6 +1,6 @@ t('Tag(s) removed') . EOL); DI::baseUrl()->redirect($_SESSION['photo_return']); // NOTREACHED @@ -63,7 +63,7 @@ function update_tags($item_id, $tags) return; } - $item = Item::selectFirst(['uri-id'], ['id' => $item_id, 'uid' => local_user()]); + $item = Post::selectFirst(['uri-id'], ['id' => $item_id, 'uid' => local_user()]); if (!DBA::isResult($item)) { return; } @@ -97,15 +97,16 @@ function tagrm_content(App $a) // NOTREACHED } - $item = Item::selectFirst(['tag'], ['id' => $item_id, 'uid' => local_user()]); + $item = Post::selectFirst(['uri-id'], ['id' => $item_id, 'uid' => local_user()]); if (!DBA::isResult($item)) { DI::baseUrl()->redirect($_SESSION['photo_return']); } - $arr = explode(',', $item['tag']); + $tag_text = Tag::getCSVByURIId($item['uri-id']); + $arr = explode(',', $tag_text); - if (empty($item['tag'])) { + if (empty($arr)) { DI::baseUrl()->redirect($_SESSION['photo_return']); }