biddyweb / substruct

Automatically exported from code.google.com/p/substruct
0 stars 0 forks source link

Admin/files, will not sort a-z. #58

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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

Original issue reported on code.google.com by johnd...@gmail.com on 18 Mar 2008 at 8:44

Attachments:

GoogleCodeExporter commented 9 years ago
This is duplicated with issue 18.

Original comment by edmundo...@gmail.com on 19 Mar 2008 at 12:13

GoogleCodeExporter commented 9 years ago
Foiled again,,, I thought i'd reviewed all the patches and incorporated,, 
obviously not

Original comment by johnd...@gmail.com on 19 Mar 2008 at 3:37

GoogleCodeExporter commented 9 years ago

Original comment by subim...@gmail.com on 9 Apr 2008 at 4:07