]> git.mxchange.org Git - friendica.git/blobdiff - mod/tagrm.php
Merge pull request #1 from friendica/develop
[friendica.git] / mod / tagrm.php
index 7e8ae8524b92a78a8be0a4cddfcc3549e62766a6..179276663b0fc5e60dba427ccae776c39d4d5d55 100644 (file)
@@ -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']);
        }