Changeset 5079


Ignore:
Timestamp:
Mar 7, 2010, 10:09:26 PM (11 years ago)
Author:
Gotcha
Message:

Trunk merge r5076 from bug:1119
bug:1119

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/cat_list.php

    r5021 r5079  
    133133    );
    134134}
     135// sort categories alpha-numerically reverse
     136else if (isset($_POST['submitOrderAlphaNumReverse']))
     137{
     138  $query = '
     139SELECT id, name
     140  FROM '.CATEGORIES_TABLE.'
     141  WHERE id_uppercat '.
     142    (!isset($_GET['parent_id']) ? 'IS NULL' : '= '.$_GET['parent_id']).'
     143;';
     144  $result = pwg_query($query);
     145  while ($row = pwg_db_fetch_assoc($result))
     146  {
     147    $categories[ $row['id'] ] = strtolower($row['name']);
     148  }
     149
     150  arsort($categories, SORT_REGULAR);
     151  save_categories_order(array_keys($categories));
     152
     153  array_push(
     154    $page['infos'],
     155    l10n('Categories ordered alphanumerically reverse')
     156    );
     157}
    135158
    136159// +-----------------------------------------------------------------------+
  • trunk/admin/template/goto/cat_list.tpl

    r5021 r5079  
    4242    <input class="submit" name="submitOrder" type="submit" value="{'Save order'|@translate}" {$TAG_INPUT_ENABLED}>
    4343    <input class="submit" name="submitOrderAlphaNum" type="submit" value="{'Order alphanumerically'|@translate}" {$TAG_INPUT_ENABLED}>
     44        <input class="submit" name="submitOrderAlphaNumReverse" type="submit" value="{'Order alphanumerically reverse'|@translate}" {$TAG_INPUT_ENABLED}>
    4445  </p>
    4546  <ul class="categoryUl">
     
    8687    <input class="submit" name="submitOrder" type="submit" value="{'Save order'|@translate}" {$TAG_INPUT_ENABLED}>
    8788    <input class="submit" name="submitOrderAlphaNum" type="submit" value="{'Order alphanumerically'|@translate}" {$TAG_INPUT_ENABLED}>
     89        <input class="submit" name="submitOrderAlphaNumReverse" type="submit" value="{'Order alphanumerically reverse'|@translate}" {$TAG_INPUT_ENABLED}>
    8890  </p>
    8991
  • trunk/language/en_UK/admin.lang.php

    r5075 r5079  
    6767$lang['Categories authorized thanks to group associations'] = 'Categories authorized thanks to group associations';
    6868$lang['Categories manual order was saved'] = 'Categories manual order was saved';
    69 $lang['Categories ordered alphanumerically'] = 'Categories ordered alphanumerically';
     69$lang['Categories ordered alphanumerically'] = 'Categories ascending alphanumerically ordered';
     70$lang['Categories ordered alphanumerically reverse'] = 'Categories descending alphanumerically ordered';
    7071$lang['Category elements associated to the following categories: %s'] = 'Category elements associated to the following categories: %s';
    7172$lang['Check for upgrade failed for unknown reasons.'] = 'Check for upgrade failed for unknown reasons.';
     
    132133$lang['Operating system'] = 'Operating system';
    133134$lang['Options'] = 'Options';
    134 $lang['Order alphanumerically'] = 'Order alphanumerically';
     135$lang['Order alphanumerically'] = 'Categories sorted in ascending order &dArr;';
     136$lang['Order alphanumerically inverse'] = 'Categories sorted in descending order &uArr;';
    135137$lang['Other private categories'] = 'Other private categories';
    136138$lang['Page banner'] = 'Page banner';
  • trunk/language/fr_FR/admin.lang.php

    r5075 r5079  
    6767$lang['Categories authorized thanks to group associations'] = 'Catégories accessibles grâce à l\'appartenance aux groupes';
    6868$lang['Categories manual order was saved'] = 'L\'ordre manuel des catégories a été sauvegardé';
    69 $lang['Categories ordered alphanumerically'] = 'Catégories ordonnées alphabético-numériquement';
     69$lang['Categories ordered alphanumerically'] = 'Catégories triées par ordre croissant alphabético-numériquement.';
     70$lang['Categories ordered alphanumerically reverse'] = 'Catégories triées par ordre décroissant alphabético-numériquement.';
    7071$lang['Category elements associated to the following categories: %s'] = 'Les éléments de la catégorie ont été associés aux catégories suivantes : %s';
    7172$lang['Check for upgrade failed for unknown reasons.'] = 'La vérification de la dernière version sur le serveur a échouée pour une raison inconnue.';
     
    132133$lang['Operating system'] = 'Système d\'exploitation';
    133134$lang['Options'] = 'Options';
    134 $lang['Order alphanumerically'] = 'Ordonner alphabético-numériquement';
     135$lang['Order alphanumerically'] = 'Trier par ordre croissant &dArr;';
     136$lang['Order alphanumerically reverse'] = 'Trier par ordre décroissant &uArr;';
    135137$lang['Other private categories'] = 'Autres catégories privées';
    136138$lang['Page banner'] = 'Bannière des pages';
Note: See TracChangeset for help on using the changeset viewer.