diff options
author | Florian Pritz <bluewind@server-speed.net> | 2011-02-02 17:13:57 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@server-speed.net> | 2011-02-02 17:13:57 +0100 |
commit | 2a199313e8d795b24d8da3ddd3237354237b9308 (patch) | |
tree | 91afc922bb750137a47976cf4bc35836ebe2016b /application/models | |
parent | 09f888c18b9d6194d243d265b68bca4e5ae5a475 (diff) |
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 <bluewind@server-speed.net>
Diffstat (limited to 'application/models')
-rw-r--r-- | application/models/file_mod.php | 11 |
1 files changed, 11 insertions, 0 deletions
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() |