From f17ec0fb65a218b03ee534b93d79517f4877dab1 Mon Sep 17 00:00:00 2001 From: Neil Blakey-Milner Date: Sun, 19 Feb 2006 11:34:48 +0000 Subject: [PATCH] Fix sorting in searches and other sorts of partial queries. --- lib/browse/PartialQuery.inc.php | 6 ++++++ 1 file changed, 6 insertions(+), 0 deletions(-) diff --git a/lib/browse/PartialQuery.inc.php b/lib/browse/PartialQuery.inc.php index f560466..b02ad8e 100644 --- a/lib/browse/PartialQuery.inc.php +++ b/lib/browse/PartialQuery.inc.php @@ -269,8 +269,11 @@ class SimpleSearchQuery extends PartialQuery { // // we also leak like ---- here, since getting the score is ... fiddly. and expensive. function getDocuments($iBatchSize, $iBatchStart, $sSortColumn, $sSortOrder, $sJoinClause = null, $aJoinParams = null) { + $this->sDocumentJoinClause = $sJoinClause; + $this->aDocumentJoinParams = $aJoinParams; $aOptions = array( 'select' => 'DISTINCT D.id AS id', + 'join' => array($sJoinClause, $aJoinParams), ); $res = $this->getQuery($aOptions); if (PEAR::isError($res)) { return array(); } @@ -374,8 +377,11 @@ class BooleanSearchQuery extends PartialQuery { // // we also leak like ---- here, since getting the score is ... fiddly. and expensive. function getDocuments($iBatchSize, $iBatchStart, $sSortColumn, $sSortOrder, $sJoinClause = null, $aJoinParams = null) { + $this->sDocumentJoinClause = $sJoinClause; + $this->aDocumentJoinParams = $aJoinParams; $aOptions = array( 'select' => 'DISTINCT D.id AS id', + 'join' => array($sJoinClause, $aJoinParams), ); $res = $this->getQuery($aOptions); if (PEAR::isError($res)) { return array(); } -- libgit2 0.21.4