Revert "Admin - show personal filesystem usage"
authorPhilipp Schüle <p.schuele@metaways.de>
Thu, 13 Jul 2017 15:34:21 +0000 (17:34 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Thu, 13 Jul 2017 15:34:21 +0000 (17:34 +0200)
This reverts commit b43547682ab1eba7832c37d53375213c21e40d95.

tine20/Admin/Frontend/Json.php

index f9a0499..3c7edee 100644 (file)
@@ -262,9 +262,6 @@ class Admin_Frontend_Json extends Tinebase_Frontend_Json_Abstract
     /**
      * get list of accounts
      *
-     * adds filesystemSize and filesystemRevisionSize columns to result, these columns currently contain the value
-     * of the filemanager personal folder ONLY.
-     *
      * @param string $_filter
      * @param string $_sort
      * @param string $_dir
@@ -277,29 +274,9 @@ class Admin_Frontend_Json extends Tinebase_Frontend_Json_Abstract
     public function getUsers($filter, $sort, $dir, $start, $limit)
     {
         $accounts = Admin_Controller_User::getInstance()->searchFullUsers($filter, $sort, $dir, $start, $limit);
-        $results = array();
-        foreach ($this->_multipleRecordsToJson($accounts) as $val) {
-            $val['filesystemSize'] = null;
-            $val['filesystemRevisionSize'] = null;
-            $results[$val['accountId']] = $val;
-        }
-
-        if (Tinebase_Application::getInstance()->isInstalled('Filemanager')) {
-            $accountIds = $accounts->getId();
-            /** @var Tinebase_Model_Tree_Node $node */
-            foreach (Tinebase_FileSystem::getInstance()->searchNodes(new Tinebase_Model_Tree_Node_Filter(array(
-                        array('field' => 'path', 'operator' => 'equals', 'value' => '/Filemanager/folders/personal'),
-                        array('field' => 'name', 'operator' => 'in', 'value' => $accountIds)
-                    ), '', array('ignoreAcl' => true))) as $node) {
-                if (isset($results[$node->name])) {
-                    $results[$node->name]['filesystemSize'] = $node->size;
-                    $results[$node->name]['filesystemRevisionSize'] = $node->revision_size;
-                }
-            }
-        }
 
         $result = array(
-            'results'     => $results,
+            'results'     => $this->_multipleRecordsToJson($accounts),
             'totalcount'  => Admin_Controller_User::getInstance()->searchCount($filter)
         );