coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: macnyc on July 30, 2005, 04:08:06 PM

Title: Edit Files - Change Sort Order
Post by: macnyc 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?
Title: Re: Edit Files - Change Sort Order
Post by: kegobeer on July 30, 2005, 05:23:50 PM
In editpics.php, change

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

to

$result = db_query("SELECT * FROM {$CONFIG['TABLE_PICTURES']} WHERE aid = '$album_id' ORDER BY mtime DESC LIMIT $start, $count");

That should do the trick.