diff --git a/SeedDMS_Core/Core/inc.ClassAttribute.php b/SeedDMS_Core/Core/inc.ClassAttribute.php index fb97e3b93..a51d6c81f 100644 --- a/SeedDMS_Core/Core/inc.ClassAttribute.php +++ b/SeedDMS_Core/Core/inc.ClassAttribute.php @@ -936,6 +936,11 @@ class SeedDMS_Core_AttributeDefinition { /* {{{ */ } } } + $valueset = $this->getValueSetAsArray(); + $possiblevalues = array(); + foreach($valueset as $value) { + $possiblevalues[md5($value)] = array('value'=>$value, 'c'=>0); + } $queryStr = "SELECT count(*) c, `value` FROM `tblDocumentAttributes` WHERE `attrdef`=".$this->_id." GROUP BY `value` ORDER BY c DESC"; $resArr = $db->getResultArray($queryStr); if($resArr) { @@ -1052,7 +1057,7 @@ class SeedDMS_Core_AttributeDefinition { /* {{{ */ * @param integer $limit limit number of documents/folders * @return array array containing list of documents and folders */ - public function getObjects($attrvalue, $limit='') { /* {{{ */ + public function getObjects($attrvalue, $limit=0) { /* {{{ */ $db = $this->_dms->getDB(); $result = array('docs'=>array(), 'folders'=>array(), 'contents'=>array());