diff options
author | blizzz <blizzz@arthur-schiwon.de> | 2020-08-07 20:55:04 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-07 20:55:04 +0000 |
commit | 326a04d12cd12b76950fe1c858123adc40c1c74c (patch) | |
tree | 1d2408d61ebce18c987e66dccce309e416fc2377 /core | |
parent | 54726d5934c47cd643900bb17e4ccc4f56e946bd (diff) | |
parent | c1831f19025ba7b2919844c8fe5e5bef1c6c7ca6 (diff) | |
download | nextcloud-server-326a04d12cd12b76950fe1c858123adc40c1c74c.tar.gz nextcloud-server-326a04d12cd12b76950fe1c858123adc40c1c74c.zip |
Merge pull request #22004 from nextcloud/enh/noid/setup-checks-php
Add setup checks for php default charset and output buffering.
Diffstat (limited to 'core')
-rw-r--r-- | core/js/setupchecks.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/core/js/setupchecks.js b/core/js/setupchecks.js index 2e94c82486c..a1f0d1aca57 100644 --- a/core/js/setupchecks.js +++ b/core/js/setupchecks.js @@ -488,6 +488,9 @@ }) } + OC.SetupChecks.addGenericSetupCheck(data, 'OCA\\Settings\\SetupChecks\\PhpDefaultCharset', messages) + OC.SetupChecks.addGenericSetupCheck(data, 'OCA\\Settings\\SetupChecks\\PhpOutputBuffering', messages) + } else { messages.push({ msg: t('core', 'Error occurred while checking server setup'), @@ -505,6 +508,24 @@ return deferred.promise(); }, + addGenericSetupCheck: function(data, check, messages) { + var setupCheck = data[check] || { pass: true, description: '', severity: 'info'} + + var type = OC.SetupChecks.MESSAGE_TYPE_INFO + if (setupCheck.severity === 'warning') { + type = OC.SetupChecks.MESSAGE_TYPE_WARNING + } else if (setupCheck.severity === 'error') { + type = OC.SetupChecks.MESSAGE_TYPE_ERROR + } + + if (!setupCheck.pass) { + messages.push({ + msg: setupCheck.description, + type: type, + }) + } + }, + /** * Runs generic checks on the server side, the difference to dedicated * methods is that we use the same XHR object for all checks to save |