diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-05-29 11:54:05 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2015-06-01 13:24:02 +0200 |
commit | 43772e2a9a4b1400e7e3a8874130ac817aa64058 (patch) | |
tree | cb107cbaf36cd44c0f8da5367ec68b7e24913659 | |
parent | 270a10b7545ba8fdf8d8736ae6b967929875cfdd (diff) | |
download | nextcloud-server-43772e2a9a4b1400e7e3a8874130ac817aa64058.tar.gz nextcloud-server-43772e2a9a4b1400e7e3a8874130ac817aa64058.zip |
Adding information on file locking status to admin section
-rw-r--r-- | settings/admin.php | 8 | ||||
-rw-r--r-- | settings/templates/admin.php | 37 |
2 files changed, 33 insertions, 12 deletions
diff --git a/settings/admin.php b/settings/admin.php index 5720bd9f99c..f2e01adab11 100644 --- a/settings/admin.php +++ b/settings/admin.php @@ -29,6 +29,8 @@ * */ +use OC\Lock\NoopLockingProvider; + OC_Util::checkAdminUser(); OC_App::setActiveNavigationEntry("admin"); @@ -175,6 +177,11 @@ $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); +} else { + $template->assign('fileLockingEnabled', true); +} $formsMap = array_map(function ($form) { if (preg_match('%(<h2[^>]*>.*?</h2>)%i', $form, $regs)) { @@ -200,6 +207,7 @@ $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 f9a99b589af..3d253d4cbbd 100644 --- a/settings/templates/admin.php +++ b/settings/templates/admin.php @@ -7,6 +7,7 @@ /** * @var array $_ * @var \OCP\IL10N $l + * @var OC_Defaults $theme */ style('settings', 'settings'); @@ -15,32 +16,32 @@ script('core', ['multiselect', 'setupchecks']); vendor_script('select2/select2'); vendor_style('select2/select2'); -$levels = array('Debug', 'Info', 'Warning', 'Error', 'Fatal'); -$levelLabels = array( +$levels = ['Debug', 'Info', 'Warning', 'Error', 'Fatal']; +$levelLabels = [ $l->t( 'Everything (fatal issues, errors, warnings, info, debug)' ), $l->t( 'Info, warnings, errors and fatal issues' ), $l->t( 'Warnings, errors and fatal issues' ), $l->t( 'Errors and fatal issues' ), $l->t( 'Fatal issues only' ), -); +]; -$mail_smtpauthtype = array( +$mail_smtpauthtype = [ '' => $l->t('None'), 'LOGIN' => $l->t('Login'), 'PLAIN' => $l->t('Plain'), 'NTLM' => $l->t('NT LAN Manager'), -); +]; -$mail_smtpsecure = array( +$mail_smtpsecure = [ '' => $l->t('None'), 'ssl' => $l->t('SSL'), 'tls' => $l->t('TLS'), -); +]; -$mail_smtpmode = array( +$mail_smtpmode = [ 'php', 'smtp', -); +]; if ($_['sendmail_is_available']) { $mail_smtpmode[] = 'sendmail'; } @@ -137,7 +138,7 @@ if (!$_['isLocaleWorking']) { ?> <br> <?php - p($l->t('We strongly suggest installing the required packages on your system to support one of the following locales: %s.', array($locales))); + p($l->t('We strongly suggest installing the required packages on your system to support one of the following locales: %s.', [$locales])); ?> </li> <?php @@ -266,12 +267,12 @@ if ($_['cronErrors']) { if (time() - $_['lastcron'] <= 3600): ?> <span class="cronstatus success"></span> <span class="crondate" original-title="<?php p($absolute_time);?>"> - <?php p($l->t("Last cron job execution: %s.", array($relative_time)));?> + <?php p($l->t("Last cron job execution: %s.", [$relative_time]));?> </span> <?php else: ?> <span class="cronstatus error"></span> <span class="crondate" original-title="<?php p($absolute_time);?>"> - <?php p($l->t("Last cron job execution: %s. Something seems wrong.", array($relative_time)));?> + <?php p($l->t("Last cron job execution: %s. Something seems wrong.", [$relative_time]));?> </span> <?php endif; else: ?> @@ -527,6 +528,18 @@ if ($_['cronErrors']) { <li><a target="_blank" href="<?php p(link_to_docs('admin-security')); ?>"><?php p($l->t('Hardening and security guidance'));?> ↗</a></li> </ul> </div> +<div class="section" id="server-status"> + <h2><?php p($l->t('Server Status'));?></h2> + <ul> + <li> + <?php if ($_['fileLockingEnabled']) { + p($l->t('Experimental File Lock is enabled.')); + } else { + p($l->t('Experimental File Lock is disabled.')); + } ?> + </li> + </ul> +</div> <div class="section"> <h2><?php p($l->t('Version'));?></h2> |