diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-09-11 11:09:49 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-09-11 11:09:49 +0200 |
commit | b8f7d85570f01a0d1baf3082b0d84b6bafc8ae8c (patch) | |
tree | 2880f619573754c36929078f3de218c5354ef340 /settings | |
parent | 57e49d200540873fa21577a6d0ad7776f20ca81a (diff) | |
parent | 732987b99fd4ef113fd8ec1bbe7e98bc9264028e (diff) | |
download | nextcloud-server-b8f7d85570f01a0d1baf3082b0d84b6bafc8ae8c.tar.gz nextcloud-server-b8f7d85570f01a0d1baf3082b0d84b6bafc8ae8c.zip |
Merge pull request #18778 from owncloud/locking-setup-warnings
Replace server status message about transitional file locking with se…
Diffstat (limited to 'settings')
-rw-r--r-- | settings/admin.php | 10 | ||||
-rw-r--r-- | 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 75b7161142f..36088d9f8c2 100644 --- a/settings/templates/admin.php +++ b/settings/templates/admin.php @@ -124,6 +124,15 @@ if (!$_['has_fileinfo']) { <?php } +// locking configured optimally? +if ($_['fileLockingType'] === 'none') { + ?> + <li> + <?php print_unescaped($l->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 <a target="_blank" href="%s">documentation ↗</a> for more information.', link_to_docs('admin-transactional-locking'))); ?> + </li> + <?php +} + // is locale working ? if (!$_['isLocaleWorking']) { ?> @@ -172,7 +181,13 @@ if ($_['cronErrors']) { <div class="loading"></div> <ul class="errors hidden"></ul> <ul class="warnings hidden"></ul> - <ul class="info hidden"></ul> + <ul class="info hidden"> + <?php if ($_['fileLockingType'] === 'db'):?> + <li> + <?php print_unescaped($l->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 <a target="_blank" href="%s">documentation ↗</a> for more information.', link_to_docs('admin-transactional-locking'))); ?> + </li> + <?php endif; ?> + </ul> <p class="hint hidden"> <?php print_unescaped($l->t('Please double check the <a target="_blank" href="%s">installation guides ↗</a>, and check for any errors or warnings in the <a href="#log-section">log</a>.', link_to_docs('admin-install'))); ?> </p> @@ -519,19 +534,6 @@ if ($_['cronErrors']) { <?php endif; ?> </div> -<div class="section" id="server-status"> - <h2><?php p($l->t('Server status'));?></h2> - <ul> - <li> - <?php if ($_['fileLockingEnabled']) { - p($l->t('Transactional File Locking is enabled.')); - } else { - p($l->t('Transactional File Locking is disabled.')); - } ?> - </li> - </ul> -</div> - <div class="section" id="admin-tips"> <h2><?php p($l->t('Tips & tricks'));?></h2> <ul> |