From 7bbb966c8c67a627e0e6de92d9a392fcb5d5b313 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 16 Aug 2010 19:36:31 +0200 Subject: show correct link to latest client Signed-off-by: Florian Pritz --- system/application/controllers/file.php | 7 ++++--- system/application/views/file/upload_form.php | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'system/application') 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); diff --git a/system/application/views/file/upload_form.php b/system/application/views/file/upload_form.php index b906dcd0f..88fbb34ef 100644 --- a/system/application/views/file/upload_form.php +++ b/system/application/views/file/upload_form.php @@ -30,7 +30,7 @@ machine paste.xinu.at password my_secret_password


If you want to you can use this script to upload files, paste text or delete your uploads:
-http://git.server-speed.net/bin/plain/fb

+


If you experience any problems feel free to contact me.


-- cgit v1.2.3-24-g4f1b