]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/RemoveUnusedTags.php
Fix processing of featured collections
[friendica.git] / src / Worker / RemoveUnusedTags.php
index 90ebd673fcebb86cd0f32531658459c146a3c69c..2090effdd36e548e9ecedb9d398b1eb97d12e5c2 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -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`)"]);
        }
 }