From 8a2d2ebf8e85c7a9e950ede92845b46b7a95ac6c Mon Sep 17 00:00:00 2001 From: rob Date: Mon, 17 Mar 2003 13:41:38 +0000 Subject: [PATCH] Fixed search error --- presentation/lookAndFeel/knowledgeTree/search/advancedSearchBL.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/presentation/lookAndFeel/knowledgeTree/search/advancedSearchBL.php b/presentation/lookAndFeel/knowledgeTree/search/advancedSearchBL.php index 7819e95..f769804 100644 --- a/presentation/lookAndFeel/knowledgeTree/search/advancedSearchBL.php +++ b/presentation/lookAndFeel/knowledgeTree/search/advancedSearchBL.php @@ -106,13 +106,13 @@ function getChosenMetaDataTags() { * Generate a string onsisting of all documents that match the search criteria * and that the user is allowed to see */ -function getApprovedDocumentString($sMetaTagIDs, $sSQLSearchString) { +function getApprovedDocumentString($sMetaTagIDs, $sSQLSearchString) { global $default; $aApprovedDocumentIDs = array(); $sQuery = "SELECT DISTINCT D.id " . "FROM documents AS D INNER JOIN document_fields_link AS DFL ON DFL.document_id = D.id " . - "INNER JOIN document_fields AS DF ON DF.id = DFL.document_field_id " . - "WHERE DF.ID IN (1,2,3,4) " . + "INNER JOIN document_fields AS DF ON DF.id = DFL.document_field_id " . + "WHERE DF.ID IN ($sMetaTagIDs) " . "AND " . $sSQLSearchString; $sql = $default->db; -- libgit2 0.21.4