summaryrefslogtreecommitdiffstats
path: root/settings/templates/admin
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-11-03 10:18:16 +0100
committerMorris Jobke <hey@morrisjobke.de>2016-11-03 10:38:00 +0100
commit074134638538fd95d484ccd041da9a96cdfb6b3c (patch)
tree7326826172e7994df732c5cd28fbf4da3bcccbb7 /settings/templates/admin
parent9ebbb3c6549200cc3c0c2a5daeabd5e64f898133 (diff)
downloadnextcloud-server-074134638538fd95d484ccd041da9a96cdfb6b3c.tar.gz
nextcloud-server-074134638538fd95d484ccd041da9a96cdfb6b3c.zip
Show a hint for system based cron user name
* makes it easier to setup cron job * gives hints for PHP documentation * disables the cron setting if requirements not met * fixes #1989 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'settings/templates/admin')
-rw-r--r--settings/templates/admin/server.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/settings/templates/admin/server.php b/settings/templates/admin/server.php
index 02d247e1b18..430ca6ac8e2 100644
--- a/settings/templates/admin/server.php
+++ b/settings/templates/admin/server.php
@@ -201,9 +201,22 @@
<input type="radio" name="mode" value="cron" class="radio"
id="backgroundjobs_cron" <?php if ($_['backgroundjobs_mode'] === "cron") {
print_unescaped('checked="checked"');
- } ?>>
+ }
+ if (!$_['cli_based_cron_possible']) {
+ print_unescaped('disabled');
+ }?>>
<label for="backgroundjobs_cron">Cron</label><br/>
- <em><?php p($l->t("Use system's cron service to call the cron.php file every 15 minutes.")); ?></em>
+ <em><?php p($l->t("Use system's cron service to call the cron.php file every 15 minutes.")); ?>
+ <?php if($_['cli_based_cron_possible']) {
+ p($l->t('The cron.php needs to be executed by the system user "%s".', [$_['cli_based_cron_user']]));
+ } else {
+ print_unescaped(str_replace(
+ ['{linkstart}', '{linkend}'],
+ ['<a href="http://php.net/manual/en/book.posix.php">', ' ↗</a>'],
+ $l->t('To run this you need the PHP posix extension. See {linkstart}PHP documentation{linkend} for more details.')
+ ));
+ } ?></em>
+
</p>
</div>