From 76eb793f9b273d2120326a280668155f39b6f61b Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Wed, 8 Jul 2020 15:12:01 +0200 Subject: [PATCH] Only translate if we need the string This translation was done in each call. Over and over and over again. All while it was probably not used in 99.99999% of the cases. A small gain. But still. Signed-off-by: Roeland Jago Douma --- lib/private/legacy/OC_Util.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php index dde47041c2..ae1b28d5bb 100644 --- a/lib/private/legacy/OC_Util.php +++ b/lib/private/legacy/OC_Util.php @@ -851,7 +851,6 @@ class OC_Util { ]; $missingDependencies = []; $invalidIniSettings = []; - $moduleHint = $l->t('Please ask your server administrator to install the module.'); $iniWrapper = \OC::$server->getIniWrapper(); foreach ($dependencies['classes'] as $class => $module) { @@ -890,7 +889,7 @@ class OC_Util { foreach ($missingDependencies as $missingDependency) { $errors[] = [ 'error' => $l->t('PHP module %s not installed.', [$missingDependency]), - 'hint' => $moduleHint + 'hint' => $l->t('Please ask your server administrator to install the module.'), ]; $webServerRestart = true; }