X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FWorker%2FRemoveUnusedTags.php;h=ecb724c38183a5531e6e32d7160cb7eea6a4ec63;hb=552a30e1f31f1a6f2ffb3f0abec6925a01d05d3a;hp=90ebd673fcebb86cd0f32531658459c146a3c69c;hpb=069a008ca4bedf8e154b4c3708ae42e50086d442;p=friendica.git diff --git a/src/Worker/RemoveUnusedTags.php b/src/Worker/RemoveUnusedTags.php index 90ebd673fc..ecb724c381 100644 --- a/src/Worker/RemoveUnusedTags.php +++ b/src/Worker/RemoveUnusedTags.php @@ -30,6 +30,6 @@ class RemoveUnusedTags */ public static function execute() { - DBA::delete('tag', ["NOT `id` IN (SELECT `tid` FROM `post-category`) AND NOT `id` IN (SELECT `tid` FROM `post-tag`)"]); + DBA::delete('tag', ["NOT `id` IN (SELECT `tid` FROM `post-category` WHERE `tid` = `tag`.`id`) AND NOT `id` IN (SELECT `tid` FROM `post-tag` WHERE `tid` = `tag`.`id`)"]); } }