summaryrefslogtreecommitdiffstats
path: root/application/models/file_mod.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2012-04-11 12:13:28 +0200
committerFlorian Pritz <bluewind@xinu.at>2012-04-11 12:13:28 +0200
commitce6162603ec08565f9ef9ff406e321b4bae2f038 (patch)
tree8725fc92320b0cf19909615098efecfdbeceb17b /application/models/file_mod.php
parentf953eba8d7c9e362fd18a311367a6fc7b9b9cac4 (diff)
Add filesize to history view
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/models/file_mod.php')
-rw-r--r--application/models/file_mod.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/application/models/file_mod.php b/application/models/file_mod.php
index b6194a39e..ffd031ace 100644
--- a/application/models/file_mod.php
+++ b/application/models/file_mod.php
@@ -88,10 +88,11 @@ class File_mod extends CI_Model {
$userid = $this->muser->get_userid();
$mimetype = exec("perl ".FCPATH.'scripts/mimetype '.escapeshellarg($filename).' '.escapeshellarg($this->file($hash)));
+ $filesize = filesize($this->file($hash));
$query = $this->db->query('
- INSERT INTO `files` (`hash`, `id`, `filename`, `user`, `date`, `mimetype`)
- VALUES (?, ?, ?, ?, ?, ?)',
- array($hash, $id, $filename, $userid, time(), $mimetype));
+ INSERT INTO `files` (`hash`, `id`, `filename`, `user`, `date`, `mimetype`, `filesize`)
+ VALUES (?, ?, ?, ?, ?, ?, ?)',
+ array($hash, $id, $filename, $userid, time(), $mimetype, $filesize));
}
function show_url($id, $mode)