Commit 8379b6b19fae035c18cc009edcdb85131ab6cf84
1 parent
4c08bbc5
corrected document string query
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2044 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
2 additions
and
2 deletions
presentation/lookAndFeel/knowledgeTree/search/advancedSearchUtil.inc
| @@ -49,11 +49,11 @@ function getApprovedDocumentString($sMetaTagIDs, $sSQLSearchString, $sStatus = " | @@ -49,11 +49,11 @@ function getApprovedDocumentString($sMetaTagIDs, $sSQLSearchString, $sStatus = " | ||
| 49 | "INNER JOIN search_document_user_link AS SDUL ON SDUL.document_id = D.ID " . | 49 | "INNER JOIN search_document_user_link AS SDUL ON SDUL.document_id = D.ID " . |
| 50 | "INNER JOIN status_lookup AS SL on D.status_id=SL.id " . | 50 | "INNER JOIN status_lookup AS SL on D.status_id=SL.id " . |
| 51 | "WHERE DF.ID IN ($sMetaTagIDs) " . | 51 | "WHERE DF.ID IN ($sMetaTagIDs) " . |
| 52 | - "AND " . $sSQLSearchString . " " . | 52 | + "AND (" . $sSQLSearchString . ") " . |
| 53 | "AND SL.name='$sStatus' " . | 53 | "AND SL.name='$sStatus' " . |
| 54 | "AND SDUL.user_id = " . $_SESSION["userID"]; | 54 | "AND SDUL.user_id = " . $_SESSION["userID"]; |
| 55 | $sql = $default->db; | 55 | $sql = $default->db; |
| 56 | - $sql->query($sQuery); | 56 | + $sql->query($sQuery); |
| 57 | while ($sql->next_record()) { | 57 | while ($sql->next_record()) { |
| 58 | $aApprovedDocuments[count($aApprovedDocuments)] = $sql->f("id"); | 58 | $aApprovedDocuments[count($aApprovedDocuments)] = $sql->f("id"); |
| 59 | } | 59 | } |