summaryrefslogtreecommitdiffstats
path: root/application/service/files.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/service/files.php')
-rw-r--r--application/service/files.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/application/service/files.php b/application/service/files.php
index ef1de2911..5e0dd140b 100644
--- a/application/service/files.php
+++ b/application/service/files.php
@@ -30,10 +30,11 @@ class files {
$total_size = $CI->db->query("
SELECT coalesce(sum(filesize), 0) sum
FROM (
- SELECT DISTINCT hash, filesize
+ SELECT DISTINCT `".$CI->db->dbprefix."file_storage`.id, filesize
FROM `".$CI->db->dbprefix."file_storage`
JOIN `".$CI->db->dbprefix."files` ON `".$CI->db->dbprefix."file_storage`.id = `".$CI->db->dbprefix."files`.file_storage_id
WHERE user = ?
+
) sub
", array($user))->row_array();