- Timestamp:
- Dec 30, 2010, 4:23:50 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/batch_manager_global.php
r8394 r8397 431 431 display_select_cat_wrapper($query, $selected_category, 'filter_category_options', true); 432 432 433 // Dissociate from a category : categories listed for dissociation can 434 // only represent virtual links. Links to physical categories can't be435 // broken433 // Dissociate from a category : categories listed for dissociation can only 434 // represent virtual links. We can't create orphans. Links to physical 435 // categories can't be broken. 436 436 if (count($page['cat_elements_id']) > 0) 437 437 { … … 528 528 $template->assign('navbar', $nav_bar); 529 529 530 $is_category = false; 531 if (isset($_SESSION['bulk_manager_filter']['category']) 532 and !isset($_SESSION['bulk_manager_filter']['category_recursive'])) 533 { 534 $is_category = true; 535 } 536 530 537 $query = ' 531 538 SELECT id,path,tn_ext,file,filesize,level,name 532 FROM '.IMAGES_TABLE.' 533 WHERE id IN ('.implode(',', $page['cat_elements_id']).') 539 FROM '.IMAGES_TABLE; 540 541 if ($is_category) 542 { 543 $category_info = get_cat_info($_SESSION['bulk_manager_filter']['category']); 544 545 $conf['order_by'] = $conf['order_by_inside_category']; 546 if (!empty($category_info['image_order'])) 547 { 548 $conf['order_by'] = ' ORDER BY '.$category_info['image_order']; 549 } 550 551 $query.= ' 552 JOIN '.IMAGE_CATEGORY_TABLE.' ON id = image_id'; 553 } 554 555 $query.= ' 556 WHERE id IN ('.implode(',', $page['cat_elements_id']).')'; 557 558 if ($is_category) 559 { 560 $query.= ' 561 AND category_id = '.$_SESSION['bulk_manager_filter']['category']; 562 } 563 564 $query.= ' 534 565 '.$conf['order_by'].' 535 566 LIMIT '.$page['nb_images'].' OFFSET '.$page['start'].'
Note: See TracChangeset
for help on using the changeset viewer.