aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2020-08-07 20:55:04 +0000
committerGitHub <noreply@github.com>2020-08-07 20:55:04 +0000
commit326a04d12cd12b76950fe1c858123adc40c1c74c (patch)
tree1d2408d61ebce18c987e66dccce309e416fc2377 /core
parent54726d5934c47cd643900bb17e4ccc4f56e946bd (diff)
parentc1831f19025ba7b2919844c8fe5e5bef1c6c7ca6 (diff)
downloadnextcloud-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.js21
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