From 2a199313e8d795b24d8da3ddd3237354237b9308 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Wed, 2 Feb 2011 17:13:57 +0100 Subject: fix bug when using client to download Do not check the client version when downloading because this breaks curl. Probably because we output and later set HTTP headers in file_mod->download(). Signed-off-by: Florian Pritz --- application/models/file_mod.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'application/models') diff --git a/application/models/file_mod.php b/application/models/file_mod.php index 4737efa0e..f781e1676 100644 --- a/application/models/file_mod.php +++ b/application/models/file_mod.php @@ -147,6 +147,17 @@ class File_mod extends CI_Model { $this->load->view('file/footer', $data); } + function check_client_version() + { + if ($this->var->cli_client == "fb-client") { + $client_version = substr($_SERVER['HTTP_USER_AGENT'], 10); + if ($this->var->latest_client != $client_version) { + echo "Your are using an old client version. Latest is ".$this->var->latest_client."\n"; + } + } + + } + // download a given ID // TODO: make smaller function download() -- cgit v1.2.3-24-g4f1b