aboutsummaryrefslogtreecommitdiffstats
path: root/action.php
diff options
context:
space:
mode:
Diffstat (limited to 'action.php')
-rw-r--r--action.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/action.php b/action.php
index 2d347f8be..c0cab23de 100644
--- a/action.php
+++ b/action.php
@@ -80,13 +80,15 @@ if ( empty($element_info) )
{
do_error(404, 'Requested id not found');
}
-
+
+// $filter['visible_categories'] and $filter['visible_images']
+// are not used because it's not necessary (filter <> restriction)
$query='
SELECT id FROM '.CATEGORIES_TABLE.'
INNER JOIN '.IMAGE_CATEGORY_TABLE.'
ON category_id=id
- WHERE image_id='.$id.'
- AND category_id NOT IN ('.$user['forbidden_categories'].')
+ WHERE image_id='.$id.'
+.'get_sql_condition_FandF(array('forbidden_categories' => 'category_id'), 'AND').'
LIMIT 1
;';
if ( mysql_num_rows(pwg_query($query))<1 )