Changeset 23813
- Timestamp:
- Jul 6, 2013, 8:31:14 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/configuration.php
r23675 r23813 113 113 $sort_fields = array( 114 114 '' => '', 115 'file '=> l10n('File name, A → Z'),115 'file ASC' => l10n('File name, A → Z'), 116 116 'file DESC' => l10n('File name, Z → A'), 117 'name '=> l10n('Photo title, A → Z'),117 'name ASC' => 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 '=> l10n('Date created, old → new'),120 'date_creation ASC' => l10n('Date created, old → new'), 121 121 'date_available DESC' => l10n('Date posted, new → old'), 122 'date_available '=> l10n('Date posted, old → new'),122 'date_available ASC' => l10n('Date posted, old → new'), 123 123 'rating_score DESC' => l10n('Rating score, high → low'), 124 'rating_score '=> l10n('Rating score, low → high'),124 'rating_score ASC' => l10n('Rating score, low → high'), 125 125 'hit DESC' => l10n('Visits, high → low'), 126 'hit '=> l10n('Visits, low → high'),127 'id '=> l10n('Numeric identifier, 1 → 9'),126 'hit ASC' => l10n('Visits, low → high'), 127 'id ASC' => l10n('Numeric identifier, 1 → 9'), 128 128 'id DESC' => l10n('Numeric identifier, 9 → 1'), 129 'rank '=> l10n('Manual sort order'),129 'rank ASC' => l10n('Manual sort order'), 130 130 ); 131 131 … … 163 163 164 164 // there is no rank outside categories 165 if ( ($i = array_search('rank ', $order_by)) !== false)165 if ( ($i = array_search('rank ASC', $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 ');173 $order_by = array('id ASC'); 174 174 } 175 175 176 $_POST['order_by'] = 'ORDER BY '.implode(', ', $order_by);177 $_POST['order_by_inside_category'] = 'ORDER BY '.implode(', ', $order_by_inside_category);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(); 337 338 $order_by = trim($conf['order_by_inside_category']); 338 339 $order_by = str_replace('ORDER BY ', null, $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); 340 $order_by = explode(', ', $order_by); 349 341 } 350 342 -
trunk/admin/element_set_ranks.php
r19703 r23813 125 125 elseif ($image_order_choice=='rank') 126 126 { 127 $image_order = 'rank ';127 $image_order = 'rank ASC'; 128 128 } 129 129 $query = ' … … 238 238 $sort_fields = array( 239 239 '' => '', 240 'file '=> l10n('File name, A → Z'),240 'file ASC' => l10n('File name, A → Z'), 241 241 'file DESC' => l10n('File name, Z → A'), 242 'name '=> l10n('Photo title, A → Z'),242 'name ASC' => l10n('Photo title, A → Z'), 243 243 'name DESC' => l10n('Photo title, Z → A'), 244 244 'date_creation DESC' => l10n('Date created, new → old'), 245 'date_creation '=> l10n('Date created, old → new'),245 'date_creation ASC' => l10n('Date created, old → new'), 246 246 'date_available DESC' => l10n('Date posted, new → old'), 247 'date_available '=> l10n('Date posted, old → new'),247 'date_available ASC' => l10n('Date posted, old → new'), 248 248 'rating_score DESC' => l10n('Rating score, high → low'), 249 'rating_score '=> l10n('Rating score, low → high'),249 'rating_score ASC' => l10n('Rating score, low → high'), 250 250 'hit DESC' => l10n('Visits, high → low'), 251 'hit '=> l10n('Visits, low → high'),252 'id '=> l10n('Numeric identifier, 1 → 9'),251 'hit ASC' => l10n('Visits, low → high'), 252 'id ASC' => l10n('Numeric identifier, 1 → 9'), 253 253 'id DESC' => l10n('Numeric identifier, 9 → 1'), 254 'rank '=> l10n('Manual sort order'),254 'rank ASC' => l10n('Manual sort order'), 255 255 ); 256 256 -
trunk/include/functions_category.inc.php
r23721 r23813 222 222 return trigger_event('get_category_preferred_image_orders', array( 223 223 array(l10n('Default'), '', true), 224 array(l10n('Photo title, A → Z'), 'name ',true),224 array(l10n('Photo title, A → Z'), 'name ASC', true), 225 225 array(l10n('Photo title, Z → A'), 'name DESC', true), 226 226 array(l10n('Date created, new → old'), 'date_creation DESC', true), 227 array(l10n('Date created, old → new'), 'date_creation ',true),227 array(l10n('Date created, old → new'), 'date_creation ASC', true), 228 228 array(l10n('Date posted, new → old'), 'date_available DESC', true), 229 array(l10n('Date posted, old → new'), 'date_available ',true),229 array(l10n('Date posted, old → new'), 'date_available ASC', true), 230 230 array(l10n('Rating score, high → low'), 'rating_score DESC', $conf['rate']), 231 array(l10n('Rating score, low → high'), 'rating_score ',$conf['rate']),231 array(l10n('Rating score, low → high'), 'rating_score ASC', $conf['rate']), 232 232 array(l10n('Visits, high → low'), 'hit DESC', true), 233 array(l10n('Visits, low → high'), 'hit ',true),233 array(l10n('Visits, low → high'), 'hit ASC', true), 234 234 array(l10n('Permissions'), 'level DESC', is_admin()), 235 235 )); -
trunk/install/config.sql
r23675 r23813 57 57 INSERT INTO piwigo_config (param,value,comment) VALUES ('week_starts_on','monday','Monday may not be the first day of the week'); 58 58 INSERT INTO piwigo_config (param,value,comment) VALUES ('updates_ignored','a:3:{s:7:"plugins";a:0:{}s:6:"themes";a:0:{}s:9:"languages";a:0:{}}','Extensions ignored for update'); 59 INSERT INTO piwigo_config (param,value,comment) VALUES ('order_by','ORDER BY date_available DESC, file,id','default photo order');60 INSERT INTO piwigo_config (param,value,comment) VALUES ('order_by_inside_category','ORDER BY date_available DESC, file,id','default photo order inside category');59 INSERT INTO piwigo_config (param,value,comment) VALUES ('order_by','ORDER BY date_available DESC, file ASC, id ASC','default photo order'); 60 INSERT INTO piwigo_config (param,value,comment) VALUES ('order_by_inside_category','ORDER BY date_available DESC, file ASC, id ASC','default photo order inside category'); 61 61 INSERT INTO piwigo_config (param,value) VALUES ('original_resize','false'); 62 62 INSERT INTO piwigo_config (param,value) VALUES ('original_resize_maxwidth','2016');
Note: See TracChangeset
for help on using the changeset viewer.