diff options
author | Florian Pritz <bluewind@xssn.at> | 2010-08-16 19:36:31 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xssn.at> | 2010-08-16 19:36:31 +0200 |
commit | 7bbb966c8c67a627e0e6de92d9a392fcb5d5b313 (patch) | |
tree | 164c96c134fc09e9c38f9372c3b50196a4708577 /system/application/controllers | |
parent | e4221a0a67a8f2249ea9c4a0777b682437987058 (diff) |
show correct link to latest client
Signed-off-by: Florian Pritz <bluewind@xssn.at>
Diffstat (limited to 'system/application/controllers')
-rw-r--r-- | system/application/controllers/file.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/system/application/controllers/file.php b/system/application/controllers/file.php index e2d30c069..ae0a51b06 100644 --- a/system/application/controllers/file.php +++ b/system/application/controllers/file.php @@ -17,12 +17,12 @@ class File extends Controller { $this->load->model('file_mod'); $this->var->cli_client = false; $this->file_mod->var->cli_client =& $this->var->cli_client; + $this->var->latest_client = trim(file_get_contents(FCPATH.'data/client/latest')); if (strpos($_SERVER['HTTP_USER_AGENT'], 'fb-client') !== false) { - $latest_client = trim(file_get_contents(FCPATH.'data/client/latest')); $client_version = substr($_SERVER['HTTP_USER_AGENT'], 10); - if ($latest_client != $client_version) { - echo "Your are using an old client version. Latest is $latest_client.\n"; + if ($this->var->latest_client != $client_version) { + echo "Your are using an old client version. Latest is $this->var->latest_client.\n"; } $this->var->cli_client = "fb-client"; } elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'libcurl') !== false) { @@ -51,6 +51,7 @@ class File extends Controller { $data['title'] = 'Upload'; $data['small_upload_size'] = $this->config->item('small_upload_size'); $data['max_upload_size'] = $this->config->item('upload_max_size'); + $data['client_link'] = base_url().'data/client/fb-'.$this->var->latest_client; $this->load->view('file/header', $data); $this->load->view('file/upload_form', $data); |