Changeset 1677 for trunk/include/functions_search.inc.php
- Timestamp:
- Dec 21, 2006, 10:38:20 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_search.inc.php
r1619 r1677 336 336 function get_quick_search_results($q) 337 337 { 338 global $user, $page ;338 global $user, $page, $filter; 339 339 $search_results = array(); 340 340 … … 385 385 INNER JOIN 386 386 '.CATEGORIES_TABLE.' c on c.id=ic.category_id 387 WHERE category_id NOT IN ('.$user['forbidden_categories'].') 387 '.get_sql_condition_FandF 388 ( 389 array 390 ( 391 'forbidden_categories' => 'category_id', 392 'visible_categories' => 'category_id', 393 'visible_images' => 'ic.image_id' 394 ), 395 'WHERE' 396 ).' 388 397 GROUP BY i.id'; 389 398 … … 428 437 INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id 429 438 WHERE id IN ('.implode(',', array_keys($by_tag_weights) ).') 430 AND category_id NOT IN ('.$user['forbidden_categories'].')'; 431 439 '.get_sql_condition_FandF 440 ( 441 array 442 ( 443 'forbidden_categories' => 'category_id', 444 'visible_categories' => 'category_id', 445 'visible_images' => 'ic.image_id' 446 ), 447 'AND' 448 ); 432 449 $allowed_image_ids = array_from_query( $query, 'id'); 433 450 $by_tag_weights = array_intersect_key($by_tag_weights, array_flip($allowed_image_ids));
Note: See TracChangeset
for help on using the changeset viewer.