From 14b1cd34cddd2f7b42563942e0fe8693c1b093b0 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 9 Jul 2021 14:21:52 +0200 Subject: [PATCH] new type foldersperuser in getStatisticalData() --- SeedDMS_Core/Core/inc.ClassDMS.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index f5e67f18f..293ccea2e 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -3174,7 +3174,14 @@ class SeedDMS_Core_DMS { function getStatisticalData($type='') { /* {{{ */ switch($type) { case 'docsperuser': - $queryStr = "select b.`fullName` as `key`, count(`owner`) as total from `tblDocuments` a left join `tblUsers` b on a.`owner`=b.`id` group by `owner`, b.`fullName`"; + $queryStr = "select concat(b.`fullName`, ' (', b.`login`, ')') as `key`, count(`owner`) as total from `tblDocuments` a left join `tblUsers` b on a.`owner`=b.`id` group by `owner`, b.`fullName`"; + $resArr = $this->db->getResultArray($queryStr); + if (!$resArr) + return false; + + return $resArr; + case 'foldersperuser': + $queryStr = "select concat(b.`fullName`, ' (', b.`login`, ')') as `key`, count(`owner`) as total from `tblFolders` a left join `tblUsers` b on a.`owner`=b.`id` group by `owner`, b.`fullName`"; $resArr = $this->db->getResultArray($queryStr); if (!$resArr) return false;