diff --git a/lib/Categories/Database.php b/lib/Categories/Database.php index 5f04195d..89be5957 100644 --- a/lib/Categories/Database.php +++ b/lib/Categories/Database.php @@ -145,8 +145,14 @@ protected function databaseSize() { break; case 'sqlite': + case 'sqlite3': if (file_exists($this->config->getSystemValue('dbhost'))) { $database_size = filesize($this->config->getSystemValue('dbhost')); + } else { + $params = $this->connection->getParams(); + if (file_exists($params['path'])) { + $database_size = filesize($params['path']); + } } break; diff --git a/lib/Categories/FilesSharing.php b/lib/Categories/FilesSharing.php index 16164d85..04c74e4d 100644 --- a/lib/Categories/FilesSharing.php +++ b/lib/Categories/FilesSharing.php @@ -68,8 +68,8 @@ public function getData() { $query->selectAlias($query->createFunction('COUNT(*)'), 'num_entries') ->addSelect(['permissions', 'share_type']) ->from('share') - ->groupBy('permissions') - ->groupBy('share_type'); + ->addGroupBy('permissions') + ->addGroupBy('share_type'); $result = $query->execute(); $data = [