Issue 58: Admin/files, will not sort a-z.
Status:  Duplicate
Owner: ----
Closed:  Apr 2008
Reported by johnd...@gmail.com, Mar 18, 2008
What steps will reproduce the problem?
1. goto admin/files
2. select a-z
3.

What is the expected output? What do you see instead?
Files should sort a-z, error in Admin/filesController#index.
Mysql::Error: Unknown column 'path' in 'order clause': SELECT * FROM
`user_uploads`   WHERE (thumbnail is NULL)  ORDER BY path ASC LIMIT 0, 30

What version of the product are you using? On what operating system?
Using latest tarbal download but checked in trunk, error appears to be
there too in controller. Development mode, linux 64bit on local and apache
server.

Please provide any additional information below.
files_controller if sort by name seeks to sort culumn 'path' which does not
exist.
change
if params[:sort] == 'name' then
      sort = "path ASC"
    else
      sort = "created_on DESC"
    end

TO

if params[:sort] == 'name' then
      sort = "filename ASC"
    else
      sort = "created_on DESC"
    end

Seems to fix it ok

 
files_controller.rb
1.4 KB   View   Download
Mar 18, 2008
#1 edmundo...@gmail.com
This is duplicated with  issue 18 .
Mar 19, 2008
#2 johnd...@gmail.com
Foiled again,,, I thought i'd reviewed all the patches and incorporated,, obviously not
Apr 8, 2008
Project Member #3 subim...@gmail.com
(No comment was entered for this change.)
Status: Duplicate