diff options
author | Joas Schilling <coding@schilljs.com> | 2021-12-01 23:00:51 +0100 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2021-12-02 09:41:33 +0000 |
commit | cabc6eaec608511d34ec250821594bd6d1b5ea36 (patch) | |
tree | 910cc06fae01ee7b5bccae31cf95bde1258755b8 /lib | |
parent | f84196b41b82ada970730073ce391e9be1764526 (diff) | |
download | nextcloud-server-cabc6eaec608511d34ec250821594bd6d1b5ea36.tar.gz nextcloud-server-cabc6eaec608511d34ec250821594bd6d1b5ea36.zip |
Fix log_query config flag
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Server.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php index e442267f8f0..0708d508c42 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -679,7 +679,16 @@ class Server extends ServerContainer implements IServerContainer { $config = $c->get(\OCP\IConfig::class); if ($config->getSystemValue('installed', false) && !(defined('PHPUNIT_RUN') && PHPUNIT_RUN)) { - $v = \OC_App::getAppVersions(); + if (!$config->getSystemValueBool('log_query')) { + $v = \OC_App::getAppVersions(); + } else { + // If the log_query is enabled, we can not get the app versions + // as that does a query, which will be logged and the logging + // depends on redis and here we are back again in the same function. + $v = [ + 'log_query' => 'enabled', + ]; + } $v['core'] = implode(',', \OC_Util::getVersion()); $version = implode(',', $v); $instanceId = \OC_Util::getInstanceId(); |