summaryrefslogtreecommitdiffstats
path: root/application/controllers/file.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/controllers/file.php')
-rw-r--r--application/controllers/file.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/application/controllers/file.php b/application/controllers/file.php
index ad70eeef9..fb219f67f 100644
--- a/application/controllers/file.php
+++ b/application/controllers/file.php
@@ -19,10 +19,12 @@ class File extends CI_Controller {
$this->var->latest_client = trim(file_get_contents(FCPATH.'data/client/latest'));
// official client uses "fb-client/$version" as useragent
- if (strpos($_SERVER['HTTP_USER_AGENT'], 'fb-client') !== false) {
- $this->var->cli_client = "fb-client";
- } elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'libcurl') !== false) {
- $this->var->cli_client = "curl";
+ $clients = array("fb-client", "libcurl", "pyfb");
+ foreach ($clients as $client) {
+ if (strpos($_SERVER['HTTP_USER_AGENT'], $client) !== false) {
+ $this->var->cli_client = true;
+ break;
+ }
}
if ($this->var->cli_client) {