From 4361ff92e2c5c2ccab16ac8b1ee63ddc9e0f1d37 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 2 Sep 2015 17:11:46 +0200 Subject: [PATCH 1/4] Replace server status message about transitional file locking with setup warnings --- settings/admin.php | 10 ++++++---- settings/templates/admin.php | 30 ++++++++++++++++-------------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/settings/admin.php b/settings/admin.php index 8410a6671ef..38683438f3a 100644 --- a/settings/admin.php +++ b/settings/admin.php @@ -193,10 +193,13 @@ $template->assign('fileSharingSettings', $fileSharingSettings); $template->assign('filesExternal', $filesExternal); $template->assign('updaterAppPanel', $updaterAppPanel); $template->assign('ocDefaultEncryptionModulePanel', $ocDefaultEncryptionModulePanel); -if (\OC::$server->getLockingProvider() instanceof NoopLockingProvider) { - $template->assign('fileLockingEnabled', false); +$lockingProvider = \OC::$server->getLockingProvider(); +if ($lockingProvider instanceof NoopLockingProvider) { + $template->assign('fileLockingType', 'none'); +} else if ($lockingProvider instanceof \OC\Lock\DBLockingProvider) { + $template->assign('fileLockingType', 'db'); } else { - $template->assign('fileLockingEnabled', true); + $template->assign('fileLockingType', 'cache'); } $formsMap = array_map(function ($form) { @@ -223,7 +226,6 @@ $formsAndMore = array_merge($formsAndMore, $formsMap); $formsAndMore[] = ['anchor' => 'backgroundjobs', 'section-name' => $l->t('Cron')]; $formsAndMore[] = ['anchor' => 'mail_general_settings', 'section-name' => $l->t('Email server')]; $formsAndMore[] = ['anchor' => 'log-section', 'section-name' => $l->t('Log')]; -$formsAndMore[] = ['anchor' => 'server-status', 'section-name' => $l->t('Server status')]; $formsAndMore[] = ['anchor' => 'admin-tips', 'section-name' => $l->t('Tips & tricks')]; if ($updaterAppPanel) { $formsAndMore[] = ['anchor' => 'updater', 'section-name' => $l->t('Updates')]; diff --git a/settings/templates/admin.php b/settings/templates/admin.php index 9c161281846..5d4ec22223e 100644 --- a/settings/templates/admin.php +++ b/settings/templates/admin.php @@ -124,6 +124,15 @@ if (!$_['has_fileinfo']) { +
  • + t('Transitional file locking is disabled, this might lead to issues with race conditions, enable \'filelocking.enabled\' to improve handling of race conditions.')); ?> +
  • + @@ -172,7 +181,13 @@ if ($_['cronErrors']) {
    - + @@ -519,19 +534,6 @@ if ($_['cronErrors']) { -
    -

    t('Server status'));?>

    - -
    -

    t('Tips & tricks'));?>

    From 732987b99fd4ef113fd8ec1bbe7e98bc9264028e Mon Sep 17 00:00:00 2001 From: Robin McCorkell Date: Fri, 11 Sep 2015 09:44:00 +0100 Subject: [PATCH 4/4] Make doc links inline --- settings/templates/admin.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/settings/templates/admin.php b/settings/templates/admin.php index 2a617387a83..91e76d24fbb 100644 --- a/settings/templates/admin.php +++ b/settings/templates/admin.php @@ -128,10 +128,7 @@ if (!$_['has_fileinfo']) { if ($_['fileLockingType'] === 'none') { ?>
  • - t('Transactional file locking is disabled, this might lead to issues with race conditions, enable \'filelocking.enabled\' in config.php to improve handling of race conditions.')); ?> - + t('Transactional file locking is disabled, this might lead to issues with race conditions. Enable \'filelocking.enabled\' in config.php to avoid these problems. See the documentation ↗ for more information.', link_to_docs('admin-transactional-locking'))); ?>
  • - t('Transactional file locking is using the database as locking backend, for best performance it\'s advised to configure a memcache for locking. Check the admin documentation for more information about locking and memcaches')); ?> - + t('Transactional file locking is using the database as locking backend, for best performance it\'s advised to configure a memcache for locking. See the documentation ↗ for more information.', link_to_docs('admin-transactional-locking'))); ?>