aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMichaIng <micha@dietpi.com>2022-02-18 16:36:43 +0100
committerMichaIng <micha@dietpi.com>2022-03-06 16:10:22 +0100
commit652a8d3d27e192d533e68999b00c17669e00e310 (patch)
treeb35adb30a906a49324e88a73e6a07e30bc7fcd58 /core
parentd07e7fb9b43b4321a55cdf0b58765df894434ac8 (diff)
downloadnextcloud-server-652a8d3d27e192d533e68999b00c17669e00e310.tar.gz
nextcloud-server-652a8d3d27e192d533e68999b00c17669e00e310.zip
Add Nextcloud docs link to OPcache recommends
A link to the Nextcloud documentation is currently only shown when the OPcache module is not loaded at all. This commit moves the link to the generic text above the individual recommendations list. Additionally remove the obsolete phpOpcacheDocumentation entry from test data arrays, which is not passed anymore by the backend. Signed-off-by: MichaIng <micha@dietpi.com>
Diffstat (limited to 'core')
-rw-r--r--core/js/setupchecks.js7
-rw-r--r--core/js/tests/specs/setupchecksSpec.js5
2 files changed, 4 insertions, 8 deletions
diff --git a/core/js/setupchecks.js b/core/js/setupchecks.js
index fdeed4897d0..95d8c6cbdc2 100644
--- a/core/js/setupchecks.js
+++ b/core/js/setupchecks.js
@@ -342,10 +342,9 @@
listOfOPcacheRecommendations += "<li>" + element + "</li>";
});
messages.push({
- msg: t(
- 'core',
- 'The PHP OPcache module is not properly configured:'
- ) + "<ul>" + listOfOPcacheRecommendations + "</ul>",
+ msg: t('core', 'The PHP OPcache module is not properly configured. See the {linkstart}documentation ↗{linkend} for more information.')
+ .replace('{linkstart}', '<a target="_blank" rel="noreferrer noopener" class="external" href="' + OC.theme.docPlaceholderUrl.replace('PLACEHOLDER', 'admin-php-opcache') + '">')
+ .replace('{linkend}', '</a>') + '<ul>' + listOfOPcacheRecommendations + '</ul>',
type: OC.SetupChecks.MESSAGE_TYPE_INFO
});
}
diff --git a/core/js/tests/specs/setupchecksSpec.js b/core/js/tests/specs/setupchecksSpec.js
index cfadcef6746..5975c875c3b 100644
--- a/core/js/tests/specs/setupchecksSpec.js
+++ b/core/js/tests/specs/setupchecksSpec.js
@@ -522,7 +522,6 @@ describe('OC.SetupChecks tests', function() {
isCorrectMemcachedPHPModuleInstalled: true,
hasPassedCodeIntegrityCheck: true,
OpcacheSetupRecommendations: [],
- phpOpcacheDocumentation: 'https://example.org/link/to/doc',
isSettimelimitAvailable: true,
hasFreeTypeSupport: true,
missingIndexes: [],
@@ -876,7 +875,6 @@ describe('OC.SetupChecks tests', function() {
isCorrectMemcachedPHPModuleInstalled: true,
hasPassedCodeIntegrityCheck: true,
OpcacheSetupRecommendations: ['recommendation1', 'recommendation2'],
- phpOpcacheDocumentation: 'https://example.org/link/to/doc',
isSettimelimitAvailable: true,
hasFreeTypeSupport: true,
missingIndexes: [],
@@ -900,7 +898,7 @@ describe('OC.SetupChecks tests', function() {
async.done(function( data, s, x ){
expect(data).toEqual([{
- msg: 'The PHP OPcache module is not properly configured:<ul><li>recommendation1</li><li>recommendation2</li></ul>',
+ msg: 'The PHP OPcache module is not properly configured. See the <a target="_blank" rel="noreferrer noopener" class="external" href="https://docs.example.org/admin-php-opcache">documentation ↗</a> for more information.<ul><li>recommendation1</li><li>recommendation2</li></ul>',
type: OC.SetupChecks.MESSAGE_TYPE_INFO
}]);
done();
@@ -932,7 +930,6 @@ describe('OC.SetupChecks tests', function() {
isCorrectMemcachedPHPModuleInstalled: true,
hasPassedCodeIntegrityCheck: true,
OpcacheSetupRecommendations: [],
- phpOpcacheDocumentation: 'https://example.org/link/to/doc',
isSettimelimitAvailable: true,
hasFreeTypeSupport: false,
missingIndexes: [],