X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Ftagrm.php;h=179276663b0fc5e60dba427ccae776c39d4d5d55;hb=ea893df1c10f27ed2d60f3cdd0d1aa1c8c9591bf;hp=7e8ae8524b92a78a8be0a4cddfcc3549e62766a6;hpb=49db63da2b11ce899639f9c1b53e1f47a456c822;p=friendica.git diff --git a/mod/tagrm.php b/mod/tagrm.php index 7e8ae8524b..179276663b 100644 --- a/mod/tagrm.php +++ b/mod/tagrm.php @@ -44,7 +44,6 @@ function tagrm_post(App $a) $item_id = $_POST['item'] ?? 0; update_tags($item_id, $tags); - info(DI::l10n()->t('Tag(s) removed') . EOL); DI::baseUrl()->redirect($_SESSION['photo_return']); // NOTREACHED @@ -97,15 +96,16 @@ function tagrm_content(App $a) // NOTREACHED } - $item = Item::selectFirst(['tag'], ['id' => $item_id, 'uid' => local_user()]); + $item = Item::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']); }