mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Sort case insensitive, date by newest first (#3560)
* Case insensitive search * Fix not adding extra sort when no sort specified. * Using newer version of fvbommel/sortorder package
This commit is contained in:
@@ -82,10 +82,10 @@ func getSort(sort string, direction string, tableName string) string {
|
||||
colName = sort
|
||||
}
|
||||
if strings.Compare(sort, "name") == 0 {
|
||||
return " ORDER BY " + colName + " COLLATE NOCASE " + direction
|
||||
return " ORDER BY " + colName + " COLLATE NATURAL_CI " + direction
|
||||
}
|
||||
if strings.Compare(sort, "title") == 0 {
|
||||
return " ORDER BY " + colName + " COLLATE NATURAL_CS " + direction
|
||||
return " ORDER BY " + colName + " COLLATE NATURAL_CI " + direction
|
||||
}
|
||||
|
||||
return " ORDER BY " + colName + " " + direction
|
||||
|
||||
Reference in New Issue
Block a user