Commit 098ba3a9d13e612ef2785663e26707c8f8a5a07e

Authored by bshuttle
1 parent 058c6457

fix for KTS-218: File Size criteria is broken and needs to be removed.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4692 c91229c3-7414-0410-bfa2-8a42b809f60b
lib/browse/Criteria.inc
... ... @@ -46,6 +46,7 @@ class BrowseCriterion {
46 46 var $iID;
47 47 var $bString = false;
48 48 var $sSearchTable = "D";
  49 + var $bVisible = true;
49 50  
50 51 function BrowseCriterion ($sDisplay, $sDocumentField, $sSortField, $iID) {
51 52 $this->sDisplay =& $sDisplay;
... ... @@ -468,6 +469,8 @@ class DateModifiedCriterion extends DateCreatedCriterion {
468 469  
469 470 class SizeCriterion extends BrowseCriterion {
470 471 var $sSearchTable = "DC";
  472 + var $bVisible = false;
  473 +
471 474 function documentDisplay ($oDocument) {
472 475 return $oDocument->getFileSize();
473 476 }
... ...
templates/ktcore/boolean_search.smarty
... ... @@ -44,8 +44,9 @@ legend { border: 1px dotted #999;}
44 44 <!-- this is bad, but we really don't need a roundtrip -->
45 45 <div style="display: none" id="search-criteria-container">
46 46 <select name="querytype">
47   - {foreach item=oCriteria from=$aCriteria}
  47 + {foreach item=oCriteria from=$aCriteria} {if ($oCriteria->bVisible == true)}
48 48 <option value="{$oCriteria->getID()}">{$oCriteria->headerDisplay()}</option>
  49 + {/if}
49 50 {/foreach}
50 51 </select>
51 52 </div>
... ... @@ -84,8 +85,9 @@ legend { border: 1px dotted #999;}
84 85 </tr>
85 86 <tr>
86 87 <td><select name="querytype">
87   - {foreach item=oCriteria from=$aCriteria}
  88 + {foreach item=oCriteria from=$aCriteria} {if ($oCriteria->bVisible == true)}
88 89 <option value="{$oCriteria->getID()}">{$oCriteria->headerDisplay()}</option>
  90 + {/if}
89 91 {/foreach}
90 92 </select>
91 93 </td>
... ...
templates/ktcore/boolean_search_edit.smarty
... ... @@ -46,8 +46,9 @@ legend { border: 1px dotted #999;}
46 46 <!-- this is bad, but we really don't need a roundtrip -->
47 47 <div style="display: none" id="search-criteria-container">
48 48 <select name="querytype">
49   - {foreach item=oCriteria from=$aCriteria}
  49 + {foreach item=oCriteria from=$aCriteria} {if ($oCriteria->bVisible == true)}
50 50 <option value="{$oCriteria->getID()}">{$oCriteria->headerDisplay()}</option>
  51 + {/if}
51 52 {/foreach}
52 53 </select>
53 54 </div>
... ... @@ -108,8 +109,9 @@ legend { border: 1px dotted #999;}
108 109  
109 110 <tr>
110 111 <td><select name="querytype">
111   - {foreach item=oCriteria from=$aCriteria}
  112 + {foreach item=oCriteria from=$aCriteria} {if ($oCriteria->bVisible == true)}
112 113 <option value="{$oCriteria->getID()}">{$oCriteria->headerDisplay()}</option>
  114 + {/if}
113 115 {/foreach}
114 116 </select>
115 117 </td>
... ...