Commit 8379b6b19fae035c18cc009edcdb85131ab6cf84

Authored by Michael Joseph
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
presentation/lookAndFeel/knowledgeTree/search/advancedSearchUtil.inc
... ... @@ -49,11 +49,11 @@ function getApprovedDocumentString($sMetaTagIDs, $sSQLSearchString, $sStatus = "
49 49 "INNER JOIN search_document_user_link AS SDUL ON SDUL.document_id = D.ID " .
50 50 "INNER JOIN status_lookup AS SL on D.status_id=SL.id " .
51 51 "WHERE DF.ID IN ($sMetaTagIDs) " .
52   - "AND " . $sSQLSearchString . " " .
  52 + "AND (" . $sSQLSearchString . ") " .
53 53 "AND SL.name='$sStatus' " .
54 54 "AND SDUL.user_id = " . $_SESSION["userID"];
55 55 $sql = $default->db;
56   - $sql->query($sQuery);
  56 + $sql->query($sQuery);
57 57 while ($sql->next_record()) {
58 58 $aApprovedDocuments[count($aApprovedDocuments)] = $sql->f("id");
59 59 }
... ...