Commit 2af87afdc69c1d89a99d964e928b5933d44c6108

Authored by bshuttle
1 parent 135b612b

fix for contain/not-contain on fulltext indices.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5335 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 9 additions and 0 deletions
lib/browse/Criteria.inc
... ... @@ -50,6 +50,7 @@ class BrowseCriterion {
50 50 var $sSearchTable = "D";
51 51 var $bVisible = true;
52 52 var $bContains = false;
  53 + var $bHandleNot = true;
53 54  
54 55 function BrowseCriterion ($sDisplay, $sDocumentField, $sSortField, $iID) {
55 56 $this->sDisplay =& $sDisplay;
... ... @@ -177,6 +178,8 @@ class BrowseCriterion {
177 178 if (is_null($aPreValue)) {
178 179 $is_positive = true;
179 180 }
  181 + if (!$this->bHandleNot) { return ''; }
  182 +
180 183 // not perfect, but acceptable.
181 184 $form_name = $this->getWidgetBase() . '_not';
182 185 $pos_select = '';
... ... @@ -557,6 +560,8 @@ class SizeCriterion extends BrowseCriterion {
557 560  
558 561 class ContentCriterion extends BrowseCriterion {
559 562 var $bContains = true;
  563 + var $bHandleNot = false;
  564 +
560 565 function documentDisplay ($oDocument) {
561 566 return "Content";
562 567 }
... ... @@ -665,6 +670,8 @@ class WorkflowStateCriterion extends BrowseCriterion {
665 670  
666 671 class TransactionTextCriterion extends BrowseCriterion {
667 672 var $bContains = true;
  673 + var $bHandleNot = false;
  674 +
668 675 function documentDisplay ($oDocument) {
669 676 return "Transaction text";
670 677 }
... ... @@ -720,6 +727,8 @@ class TransactionTextCriterion extends BrowseCriterion {
720 727  
721 728 class SearchableTextCriterion extends BrowseCriterion {
722 729 var $bContains = true;
  730 + var $bHandleNot = false;
  731 +
723 732 function documentDisplay ($oDocument) {
724 733 return "Searchable text";
725 734 }
... ...