summaryrefslogtreecommitdiffstats
path: root/system/application/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'system/application/controllers')
-rw-r--r--system/application/controllers/file.php7
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);