From 7e06f051c9f48dcfc64ddd9c49124e3ee8b1e773 Mon Sep 17 00:00:00 2001 From: Loki3000 Date: Tue, 10 Jan 2017 17:16:56 +0300 Subject: [PATCH] remove non required sql requests ``` SELECT `appid`, `configkey`, `configvalue` FROM `preferences` WHERE `userid` = ''; ``` --- lib/private/AllConfig.php | 11 ++++++++--- 1 file 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)); -- 2.39.5