diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2020-07-25 21:53:39 +0200 |
---|---|---|
committer | Daniel Kesselberg <mail@danielkesselberg.de> | 2020-07-26 00:54:16 +0200 |
commit | 89c6a2bc1fa34498e82f7b9b6e8e7160c46dc3fd (patch) | |
tree | 157c15557e18c254279d18f70e0890a6239a45e2 /core/js/setupchecks.js | |
parent | 34c3d0a97708b9d5cbd6a0667c4f0be881e7a6de (diff) | |
download | nextcloud-server-89c6a2bc1fa34498e82f7b9b6e8e7160c46dc3fd.tar.gz nextcloud-server-89c6a2bc1fa34498e82f7b9b6e8e7160c46dc3fd.zip |
Add setup checks for php default charset and output buffering.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'core/js/setupchecks.js')
-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..62c9797d208 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) { + const setupCheck = data[check] || { pass: true, description: '', severity: 'info'} + + let 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 |