Changeset 1120 for trunk/include/section_init.inc.php
- Timestamp:
- Apr 4, 2006, 2:35:12 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/section_init.inc.php
r1119 r1120 162 162 } 163 163 } 164 164 165 165 array_push( 166 166 $page['tags'], … … 306 306 'uppercats' => $result['uppercats'], 307 307 308 'title' => get_cat_display_name($result['name'], null, false),308 'title' => get_cat_display_name($result['name'], '', false), 309 309 ) 310 310 ); … … 361 361 // reachable to the connected user, we need to check category 362 362 // associations 363 if (!empty($user['forbidden_categories']) )363 if (!empty($user['forbidden_categories']) and !empty($items) ) 364 364 { 365 365 $query = ' … … 382 382 $result = pwg_query($query); 383 383 $tag_infos = array(); 384 384 385 385 while ($row = mysql_fetch_array($result)) 386 386 { … … 429 429 include_once( PHPWG_ROOT_PATH .'include/functions_search.inc.php' ); 430 430 431 $query = ' 431 $search_items = get_search_items($page['search']); 432 if ( !empty($search_items) ) 433 { 434 $query = ' 432 435 SELECT DISTINCT(id) 433 436 FROM '.IMAGES_TABLE.' 434 437 INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id 435 WHERE id IN ('.implode(',', get_search_items($page['search'])).')438 WHERE id IN ('.implode(',', $search_items).') 436 439 AND '.$forbidden.' 437 440 '.$conf['order_by'].' 438 ;'; 441 ;'; 442 $page['items'] = array_from_query($query, 'id'); 443 } 444 else 445 { 446 $page['items'] = array(); 447 } 439 448 440 449 $page = array_merge( … … 442 451 array( 443 452 'title' => $lang['search_result'], 444 'items' => array_from_query($query, 'id'),445 453 'thumbnails_include' => 'include/category_default.inc.php', 446 454 )
Note: See TracChangeset
for help on using the changeset viewer.