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 | |
parent | e4221a0a67a8f2249ea9c4a0777b682437987058 (diff) |
show correct link to latest client
Signed-off-by: Florian Pritz <bluewind@xssn.at>
Diffstat (limited to 'system/application')
-rw-r--r-- | system/application/controllers/file.php | 7 | ||||
-rw-r--r-- | system/application/views/file/upload_form.php | 2 |
2 files changed, 5 insertions, 4 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); 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 </p> <br /> <p>If you want to you can use this script to upload files, paste text or delete your uploads:<br /> -<a href="http://git.server-speed.net/bin/plain/fb">http://git.server-speed.net/bin/plain/fb</a></p> +<a href="<?php echo $client_link; ?>"><?php echo $client_link; ?></a></p> <br /> <p>If you experience any problems feel free to <a href="http://bluewind.at/?id=1">contact me</a>.</p> <br /> |