Edit Files - Change Sort Order Edit Files - Change Sort Order
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

Edit Files - Change Sort Order

Started by macnyc, July 30, 2005, 04:08:06 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

macnyc

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?

kegobeer

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.
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