remove non required sql requests

```
SELECT `appid`, `configkey`, `configvalue` FROM `preferences` WHERE `userid` = '';
```
This commit is contained in:
Loki3000 2017-01-10 17:16:56 +03:00 committed by GitHub
parent 8ab16f87ac
commit 7e06f051c9
1 changed files with 8 additions and 3 deletions

View 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));