mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
init possible values of attribute in getStatistic()
This commit is contained in:
parent
9b986e16c5
commit
b8763822d0
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue
Block a user