Commit 8a2d2ebf8e85c7a9e950ede92845b46b7a95ac6c
1 parent
ed3a9f38
Fixed search error
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1605 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
3 additions
and
3 deletions
presentation/lookAndFeel/knowledgeTree/search/advancedSearchBL.php
| ... | ... | @@ -106,13 +106,13 @@ function getChosenMetaDataTags() { |
| 106 | 106 | * Generate a string onsisting of all documents that match the search criteria |
| 107 | 107 | * and that the user is allowed to see |
| 108 | 108 | */ |
| 109 | -function getApprovedDocumentString($sMetaTagIDs, $sSQLSearchString) { | |
| 109 | +function getApprovedDocumentString($sMetaTagIDs, $sSQLSearchString) { | |
| 110 | 110 | global $default; |
| 111 | 111 | $aApprovedDocumentIDs = array(); |
| 112 | 112 | $sQuery = "SELECT DISTINCT D.id " . |
| 113 | 113 | "FROM documents AS D INNER JOIN document_fields_link AS DFL ON DFL.document_id = D.id " . |
| 114 | - "INNER JOIN document_fields AS DF ON DF.id = DFL.document_field_id " . | |
| 115 | - "WHERE DF.ID IN (1,2,3,4) " . | |
| 114 | + "INNER JOIN document_fields AS DF ON DF.id = DFL.document_field_id " . | |
| 115 | + "WHERE DF.ID IN ($sMetaTagIDs) " . | |
| 116 | 116 | "AND " . $sSQLSearchString; |
| 117 | 117 | |
| 118 | 118 | $sql = $default->db; | ... | ... |