diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-09-01 01:43:50 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-09-01 01:43:50 +0000 |
commit | 7b2c2c7de3f7102b161d562b4a98a095278e8c87 (patch) | |
tree | 5249022c808283e0109e417adaff654da7622c87 /modules/search | |
parent | dc3e02fbfdc6c477e74e7b62b74df46fad3853e8 (diff) | |
download | brdo-7b2c2c7de3f7102b161d562b4a98a095278e8c87.tar.gz brdo-7b2c2c7de3f7102b161d562b4a98a095278e8c87.tar.bz2 |
Temporary roll-back of #890994, per Dries's feedback.
Diffstat (limited to 'modules/search')
-rw-r--r-- | modules/search/search.extender.inc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/search/search.extender.inc b/modules/search/search.extender.inc index 6c0c7600b..1eae2caa6 100644 --- a/modules/search/search.extender.inc +++ b/modules/search/search.extender.inc @@ -415,6 +415,10 @@ class SearchQuery extends SelectQueryExtender { // Add default score. $this->addScore('i.relevance'); } + if (count($this->getOrderBy()) == 0) { + // Add default order. + $this->orderBy('calculated_score', 'DESC'); + } if (count($this->multiply)) { // Add the total multiplicator as many times as requested to maintain @@ -432,11 +436,6 @@ class SearchQuery extends SelectQueryExtender { // Convert scores to an expression. $this->addExpression('SUM(' . implode(' + ', $this->scores) . ')', 'calculated_score', $this->scoresArguments); - if (count($this->getOrderBy()) == 0) { - // Add default order after adding the expression. - $this->orderBy('calculated_score', 'DESC'); - } - // Add tag and useful metadata. $this ->addTag('search_' . $this->type) |