]> source.dussan.org Git - nextcloud-server.git/commitdiff
remove non required sql requests 3007/head
authorLoki3000 <github@labcms.ru>
Tue, 10 Jan 2017 14:16:56 +0000 (17:16 +0300)
committerGitHub <noreply@github.com>
Tue, 10 Jan 2017 14:16:56 +0000 (17:16 +0300)
```
SELECT `appid`, `configkey`, `configvalue` FROM `preferences` WHERE `userid` = '';
```

lib/private/AllConfig.php

index 4e13d70371b7fd526b0c9ce8d11c03b7cf7ad663..a58aec4aeeac2dc5f26a9f426daaf496a8ed3320 100644 (file)
@@ -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));