Commit 1de3a0e1a4a438f2f4e3ddbd9bf2351a871e9180

Authored by Conrad Vermeulen
1 parent 66f0e5c4

KTS-2150

"Custom metadata does not show up in the advanced search drop down list"
Fixed. The tag cloud uses metadata tables to store the metadata, so need to just prevent the generic metadata from showing the tag cloud specific field.

Reviewed By: Kevin Fourie

git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@6872 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 12 additions and 6 deletions
lib/browse/criteriaregistry.php
... ... @@ -5,7 +5,7 @@
5 5 * License Version 1.1.2 ("License"); You may not use this file except in
6 6 * compliance with the License. You may obtain a copy of the License at
7 7 * http://www.knowledgetree.com/KPL
8   - *
  8 + *
9 9 * Software distributed under the License is distributed on an "AS IS"
10 10 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
11 11 * See the License for the specific language governing rights and
... ... @@ -16,9 +16,9 @@
16 16 * (ii) the KnowledgeTree copyright notice
17 17 * in the same form as they appear in the distribution. See the License for
18 18 * requirements.
19   - *
  19 + *
20 20 * The Original Code is: KnowledgeTree Open Source
21   - *
  21 + *
22 22 * The Initial Developer of the Original Code is The Jam Warehouse Software
23 23 * (Pty) Ltd, trading as KnowledgeTree.
24 24 * Portions created by The Jam Warehouse Software (Pty) Ltd are Copyright
... ... @@ -46,12 +46,18 @@ class KTCriteriaRegistry {
46 46 foreach($aFields as $oField) {
47 47 $sNamespace = $oField->getNamespace();
48 48 $oFieldset =& KTFieldset::get($oField->getParentFieldset());
49   - if(is_null($oFieldset->userinfo)){continue;}
  49 + if ($oFieldset->getName() == 'Tag Cloud')
  50 + {
  51 + continue;
  52 + }
  53 +
  54 + //if(is_null($oFieldset->userinfo)){continue;}
50 55 $aInitialize = array(sprintf("%s: %s", $oFieldset->getName(), $oField->getName()), 'id', 'id', $oField->getId(), $sNamespace);
51 56 $this->registerCriterion('GenericMetadataCriterion', $sNamespace, null, $aInitialize);
52 57 }
  58 +
53 59 $this->_bGenericRegistered = true;
54   - }
  60 + }
55 61  
56 62 function registerCriterion($sClassName, $sNamespace = null, $sFilename = null, $aInitialize = null) {
57 63 $this->_aCriteriaDetails[$sNamespace] = array($sClassName, $sNamespace, $sFilename, $aInitialize);
... ... @@ -77,7 +83,7 @@ class KTCriteriaRegistry {
77 83 $sClassName = $aDetails[0];
78 84 $oCriterion =& new $sClassName();
79 85  
80   -
  86 +
81 87 if(is_array($aDetails[3])) {
82 88 call_user_func_array(array(&$oCriterion, 'initialize'), $aDetails[3]);
83 89 }
... ...