View Single Post
Old March 8th, 2005, 12:34 AM   #7 (permalink)
Hammerfel
Junior Member
Verified Customer
 
Join Date: Jan 2005
Posts: 7
Re: Use Display Options to sort newest to oldest

Ok, my admin friend fixed the mising code and the sorting works now.

If it helps, he said

Quote:
I didn't have time to wade through all the code in browseimages.php tonight
to see exactly why the sort order wasn't being set, but I did create a fix
anyway. I checked $condition['direction'] (that's where the sort order
should be) and found it was blank right before the query, so just above the
query I added:

if (!isset($condition['direction'])) {
$condition['direction'] = iif($_REQUEST['direction'] == 'ASC', 'ASC',
'DESC');
}

That fills in 'direction' with what you set it to in the request if the
code gets that far without setting it itself. It shouldn't get in the way
when the code sets it to DESC or ASC automatically for other types of browsing.
Hammerfel is offline