ajshort/silverstripe-facetedlisting — pull request #1 by oddnoc (2012-02-14 23:14:54+00:00)
Title: Correct SQL syntax errors in ORDER BY expression when a class has a $default_sort with a direction.

- Accept $default_sort strings as they are often expressed, without " marks or with lower-case keywords.
- Make " marks optional in regex
- Make ASC|DESC case-insensitive
- Use correct element, $matches[2] to access ASC|DESC (not $matches[0])

This fixes a problem where the order by syntax was getting mangled.