Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/issuetemplate.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Haertl <jus@bitgrid.net>2017-02-01 19:41:38 +0300
committerJulius Haertl <jus@bitgrid.net>2017-02-01 19:41:38 +0300
commitf9ef0ef96b2225ac177c69ac2a591618bb5b5d5c (patch)
tree60e06ff0287c15e1431d1accbfd80e117898d651
parent473ff3f39da278217c634def8ca5a3f4300df44a (diff)
Fix more key warnings
-rw-r--r--lib/Settings/Admin.php20
1 files changed, 16 insertions, 4 deletions
diff --git a/lib/Settings/Admin.php b/lib/Settings/Admin.php
index 7a27157..c8b763d 100644
--- a/lib/Settings/Admin.php
+++ b/lib/Settings/Admin.php
@@ -48,6 +48,8 @@ class Admin implements ISettings {
private $appManager;
/** @var SystemConfig */
private $systemConfig;
+ /** @var IDBConnection */
+ private $connection;
public function __construct(
IConfig $config,
@@ -260,12 +262,22 @@ class Admin implements ISettings {
private function getBrowser() {
$browser = @get_browser(null, true);
- if(!$browser) {
+ $browserString = '';
+ if($browser) {
+ if(array_key_exists('browser', $browser)) {
+ $browserString .= $browser['browser'] . ' ';
+ }
+ if(array_key_exists('version', $browser)) {
+ $browserString .= $browser['version'] . ' ';
+ }
+ if(array_key_exists('plattform', $browser)) {
+ $browserString .= $browser['plattform'] . ' ';
+ }
+ }
+ if(empty($browserString)) {
return $_SERVER['HTTP_USER_AGENT'];
- } else {
- $string = ' ' . $browser['browser'] . ' ' . $browser['version'] . ' ' . $browser['plattform'];
- return $string;
}
+ return $browserString;
}
}