Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Edit Files - Change Sort Order  (Read 2560 times)

0 Members and 1 Guest are viewing this topic.

macnyc

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
Edit Files - Change Sort Order
« on: July 30, 2005, 04:08:06 pm »

When I am in admin mode - and I select the edit files link next to the album I want to edit - the pictures are listed in file name order.  I want to have the images listed in order of upload so that I can prune and delete the older images.  Is this possible?
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Edit Files - Change Sort Order
« Reply #1 on: July 30, 2005, 05:23:50 pm »

In editpics.php, change

Code: [Select]
$result = db_query("SELECT * FROM {$CONFIG['TABLE_PICTURES']} WHERE aid = '$album_id' ORDER BY filename LIMIT $start, $count");
to

Code: [Select]
$result = db_query("SELECT * FROM {$CONFIG['TABLE_PICTURES']} WHERE aid = '$album_id' ORDER BY mtime DESC LIMIT $start, $count");
That should do the trick.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 20 queries.