From ce6162603ec08565f9ef9ff406e321b4bae2f038 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Wed, 11 Apr 2012 12:13:28 +0200 Subject: Add filesize to history view Signed-off-by: Florian Pritz --- application/models/file_mod.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'application/models/file_mod.php') 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) -- cgit v1.2.3-24-g4f1b