diff options
author | Loki3000 <github@labcms.ru> | 2017-01-10 17:16:56 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-10 17:16:56 +0300 |
commit | 7e06f051c9f48dcfc64ddd9c49124e3ee8b1e773 (patch) | |
tree | d9c2b0654f6906fa1e30f07b32dd0c68cc5428bc /lib/private/AllConfig.php | |
parent | 8ab16f87ac7a8767ff1320fd41e36b2eda4cbd83 (diff) | |
download | nextcloud-server-7e06f051c9f48dcfc64ddd9c49124e3ee8b1e773.tar.gz nextcloud-server-7e06f051c9f48dcfc64ddd9c49124e3ee8b1e773.zip |
remove non required sql requests
```
SELECT `appid`, `configkey`, `configvalue` FROM `preferences` WHERE `userid` = '';
```
Diffstat (limited to 'lib/private/AllConfig.php')
-rw-r--r-- | lib/private/AllConfig.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/private/AllConfig.php b/lib/private/AllConfig.php index 4e13d70371b..a58aec4aeea 100644 --- a/lib/private/AllConfig.php +++ b/lib/private/AllConfig.php @@ -358,12 +358,17 @@ class AllConfig implements \OCP\IConfig { * ] */ private function getUserValues($userId) { - // TODO - FIXME - $this->fixDIInit(); - if (isset($this->userCache[$userId])) { return $this->userCache[$userId]; } + if ($userId === null || $userId === '') { + $this->userCache[$userId]=array(); + return $this->userCache[$userId]; + } + + // TODO - FIXME + $this->fixDIInit(); + $data = array(); $query = 'SELECT `appid`, `configkey`, `configvalue` FROM `*PREFIX*preferences` WHERE `userid` = ?'; $result = $this->connection->executeQuery($query, array($userId)); |