Ignore:
Timestamp:
10/30/10 22:03:05 (9 years ago)
Author:
plg
Message:

bug 1906 fixed: during batch management, for a given category, use the category
defined sort order for photos, not the generic order_by.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.1/admin/element_set_global.php

    r6364 r7504  
    450450  $query = ' 
    451451SELECT id,path,tn_ext,file,filesize,level 
    452   FROM '.IMAGES_TABLE.' 
     452  FROM '.IMAGES_TABLE; 
     453 
     454  if (is_numeric($_GET['cat'])) 
     455  { 
     456    $category_info = get_cat_info($_GET['cat']); 
     457     
     458    $conf['order_by'] = $conf['order_by_inside_category']; 
     459    if (!empty($category_info['image_order'])) 
     460    { 
     461      $conf['order_by'] = ' ORDER BY '.$category_info['image_order']; 
     462    } 
     463 
     464    $query.= ' 
     465    JOIN '.IMAGE_CATEGORY_TABLE.' ON id = image_id'; 
     466  } 
     467 
     468  $query.= ' 
    453469  WHERE id IN ('.implode(',', $page['cat_elements_id']).') 
    454470  '.$conf['order_by'].' 
Note: See TracChangeset for help on using the changeset viewer.