Changeset 23675 for trunk/admin
- Timestamp:
- Jun 30, 2013, 6:16:01 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/configuration.php
r23643 r23675 113 113 $sort_fields = array( 114 114 '' => '', 115 'file ASC'=> l10n('File name, A → Z'),115 'file' => l10n('File name, A → Z'), 116 116 'file DESC' => l10n('File name, Z → A'), 117 'name ASC'=> l10n('Photo title, A → Z'),117 'name' => l10n('Photo title, A → Z'), 118 118 'name DESC' => l10n('Photo title, Z → A'), 119 119 'date_creation DESC' => l10n('Date created, new → old'), 120 'date_creation ASC'=> l10n('Date created, old → new'),120 'date_creation' => l10n('Date created, old → new'), 121 121 'date_available DESC' => l10n('Date posted, new → old'), 122 'date_available ASC'=> l10n('Date posted, old → new'),122 'date_available' => l10n('Date posted, old → new'), 123 123 'rating_score DESC' => l10n('Rating score, high → low'), 124 'rating_score ASC'=> l10n('Rating score, low → high'),124 'rating_score' => l10n('Rating score, low → high'), 125 125 'hit DESC' => l10n('Visits, high → low'), 126 'hit ASC'=> l10n('Visits, low → high'),127 'id ASC'=> l10n('Numeric identifier, 1 → 9'),126 'hit' => l10n('Visits, low → high'), 127 'id' => l10n('Numeric identifier, 1 → 9'), 128 128 'id DESC' => l10n('Numeric identifier, 9 → 1'), 129 'rank ASC'=> l10n('Manual sort order'),129 'rank' => l10n('Manual sort order'), 130 130 ); 131 131 … … 163 163 164 164 // there is no rank outside categories 165 if ( ($i = array_search('rank ASC', $order_by)) !== false)165 if ( ($i = array_search('rank', $order_by)) !== false) 166 166 { 167 167 unset($order_by[$i]); … … 171 171 if ( count($order_by) == 0 ) 172 172 { 173 $order_by = array('id ASC');173 $order_by = array('id'); 174 174 } 175 175 176 $_POST['order_by'] = 'ORDER BY '.implode(', 177 $_POST['order_by_inside_category'] = 'ORDER BY '.implode(', 176 $_POST['order_by'] = 'ORDER BY '.implode(',', $order_by); 177 $_POST['order_by_inside_category'] = 'ORDER BY '.implode(',', $order_by_inside_category); 178 178 } 179 179 } … … 335 335 else 336 336 { 337 $out = array();338 337 $order_by = trim($conf['order_by_inside_category']); 339 338 $order_by = str_replace('ORDER BY ', null, $order_by); 340 $order_by = explode(', ', $order_by); 339 $order_by = explode(',', $order_by); 340 foreach($order_by as &$order) 341 { 342 $order = trim($order); 343 if (substr_compare($order, ' ASC', -4)==0) 344 { 345 $order = substr($order, 0, -4); 346 } 347 } 348 unset($order); 341 349 } 342 350
Note: See TracChangeset
for help on using the changeset viewer.