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_unit.php

    r6713 r7504  
    195195  $query = ' 
    196196SELECT id,path,tn_ext,name,date_creation,comment,author,level,file 
    197   FROM '.IMAGES_TABLE.' 
     197  FROM '.IMAGES_TABLE; 
     198 
     199  if (is_numeric($_GET['cat'])) 
     200  { 
     201    $category_info = get_cat_info($_GET['cat']); 
     202     
     203    $conf['order_by'] = $conf['order_by_inside_category']; 
     204    if (!empty($category_info['image_order'])) 
     205    { 
     206      $conf['order_by'] = ' ORDER BY '.$category_info['image_order']; 
     207    } 
     208 
     209    $query.= ' 
     210    JOIN '.IMAGE_CATEGORY_TABLE.' ON id = image_id'; 
     211  } 
     212 
     213  $query.= ' 
    198214  WHERE id IN ('.implode(',', $page['cat_elements_id']).') 
    199215  '.$conf['order_by'].' 
Note: See TracChangeset for help on using the changeset viewer.