summaryrefslogtreecommitdiffstats
path: root/application/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'application/controllers')
-rw-r--r--application/controllers/file.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/application/controllers/file.php b/application/controllers/file.php
index a3156eb4b..bb0236123 100644
--- a/application/controllers/file.php
+++ b/application/controllers/file.php
@@ -339,9 +339,20 @@ class File extends CI_Controller {
}
}
+ $total_size = $this->db->query("
+ SELECT sum(filesize) sum
+ FROM (
+ SELECT filesize
+ FROM files
+ WHERE user = ?
+ GROUP BY hash
+ ) sub
+ ", array($user))->row_array();
+
$this->data["query"] = $query;
$this->data["lengths"] = $lengths;
$this->data["fields"] = $fields;
+ $this->data["total_size"] = format_bytes($total_size["sum"]);
$cached = "";
$cached .= $this->load->view($this->var->view_dir.'/header', $this->data, true);