aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include/functions_metadata.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--admin/include/functions_metadata.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/admin/include/functions_metadata.php b/admin/include/functions_metadata.php
index 23dca79a9..337019b2e 100644
--- a/admin/include/functions_metadata.php
+++ b/admin/include/functions_metadata.php
@@ -224,7 +224,9 @@ SELECT id
$query = '
SELECT id, path
FROM '.IMAGES_TABLE.'
- WHERE storage_category_id IN ('.implode(',', $cat_ids).')';
+ INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON image_id = id
+ WHERE is_storage = \'true\'
+ AND category_id IN ('.implode(',', $cat_ids).')';
if ($only_new)
{
$query.= '