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

merge r7504 from branch 2.1 to trunk

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
  • trunk/admin/element_set_global.php

    r6946 r7505  
    435435  $query = ' 
    436436SELECT id,path,tn_ext,file,filesize,level 
    437   FROM '.IMAGES_TABLE.' 
     437  FROM '.IMAGES_TABLE; 
     438 
     439  if (is_numeric($_GET['cat'])) 
     440  { 
     441    $category_info = get_cat_info($_GET['cat']); 
     442     
     443    $conf['order_by'] = $conf['order_by_inside_category']; 
     444    if (!empty($category_info['image_order'])) 
     445    { 
     446      $conf['order_by'] = ' ORDER BY '.$category_info['image_order']; 
     447    } 
     448 
     449    $query.= ' 
     450    JOIN '.IMAGE_CATEGORY_TABLE.' ON id = image_id'; 
     451  } 
     452 
     453  $query.= ' 
    438454  WHERE id IN ('.implode(',', $page['cat_elements_id']).') 
    439455  '.$conf['order_by'].' 
Note: See TracChangeset for help on using the changeset viewer.