Ignore:
Timestamp:
Feb 2, 2011, 10:35:48 AM (13 years ago)
Author:
plg
Message:

bug 2172 fixed: the "sort order" options are removed from the album administration main page.

bug 2173 fixed: rename "manual order" into "automatic order" and "by rank" into "manual order"

bug 2174 fixed: only show the automatic order options when it's relevant

new icon for the "manage photo order" screen

hide the numeric rank below the thumbnail (it is confusing for users)

tell users that you can drag'n drop to reorder photos

bug fixed: the "apply to sub-albums" options for photo orders was not working

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/element_set_ranks.php

    r8728 r9051  
    9090if (isset($_POST['submit']))
    9191{
    92   asort($_POST['rank_of_image'], SORT_NUMERIC);
     92  if (isset($_POST['rank_of_image']))
     93  {
     94    asort($_POST['rank_of_image'], SORT_NUMERIC);
    9395 
    94   save_images_order(
    95     $page['category_id'],
    96     array_keys($_POST['rank_of_image'])
    97     );
    98 
    99   array_push(
    100     $page['infos'],
    101     l10n('Images manual order was saved')
    102     );
     96    save_images_order(
     97      $page['category_id'],
     98      array_keys($_POST['rank_of_image'])
     99      );
     100
     101    array_push(
     102      $page['infos'],
     103      l10n('Images manual order was saved')
     104      );
     105  }
    103106
    104107  $image_order = null;
     
    135138  WHERE id='.$page['category_id'];
    136139  pwg_query($query);
     140
     141  if (isset($_POST['image_order_subcats']))
     142  {
     143    $cat_info = get_cat_info($page['category_id']);
     144   
     145    $query = '
     146UPDATE '.CATEGORIES_TABLE.'
     147  SET image_order = '.(isset($image_order) ? '\''.$image_order.'\'' : 'NULL').'
     148  WHERE uppercats LIKE \''.$cat_info['uppercats'].',%\'';
     149    pwg_query($query);
     150  }
     151
     152  array_push($page['infos'], l10n('Your configuration settings are saved'));
    137153}
    138154
Note: See TracChangeset for help on using the changeset viewer.