@@ -30,19 +30,19 @@ discard block |
||
30 | 30 | <h2 class="inlineblock"><?php p($l->t('Background jobs'));?></h2> |
31 | 31 | <p class="cronlog inlineblock"> |
32 | 32 | <?php if ($_['lastcron'] !== false) { |
33 | - $relative_time = relative_modified_date($_['lastcron']); |
|
34 | - $maxAgeRelativeTime = relative_modified_date($_['cronMaxAge']); |
|
33 | + $relative_time = relative_modified_date($_['lastcron']); |
|
34 | + $maxAgeRelativeTime = relative_modified_date($_['cronMaxAge']); |
|
35 | 35 | |
36 | - $formatter = \OC::$server->getDateTimeFormatter(); |
|
37 | - $absolute_time = $formatter->formatDateTime($_['lastcron'], 'long', 'long'); |
|
38 | - $maxAgeAbsoluteTime = $formatter->formatDateTime($_['cronMaxAge'], 'long', 'long'); |
|
39 | - if (time() - $_['lastcron'] > 600) { ?> |
|
36 | + $formatter = \OC::$server->getDateTimeFormatter(); |
|
37 | + $absolute_time = $formatter->formatDateTime($_['lastcron'], 'long', 'long'); |
|
38 | + $maxAgeAbsoluteTime = $formatter->formatDateTime($_['cronMaxAge'], 'long', 'long'); |
|
39 | + if (time() - $_['lastcron'] > 600) { ?> |
|
40 | 40 | <span class="status error"></span> |
41 | 41 | <span class="crondate" title="<?php p($absolute_time);?>"> |
42 | 42 | <?php p($l->t("Last job execution ran %s. Something seems wrong.", [$relative_time]));?> |
43 | 43 | </span> |
44 | 44 | <?php } elseif (time() - $_['cronMaxAge'] > 12*3600) { |
45 | - if ($_['backgroundjobs_mode'] === 'cron') { ?> |
|
45 | + if ($_['backgroundjobs_mode'] === 'cron') { ?> |
|
46 | 46 | <span class="status warning"></span> |
47 | 47 | <span class="crondate" title="<?php p($maxAgeAbsoluteTime);?>"> |
48 | 48 | <?php p($l->t("Some jobs haven’t been executed since %s. Please consider increasing the execution frequency.", [$maxAgeRelativeTime]));?> |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | <?php p($l->t("Some jobs didn’t execute since %s. Please consider switching to system cron.", [$maxAgeRelativeTime]));?> |
54 | 54 | </span> |
55 | 55 | <?php } |
56 | - } else { ?> |
|
56 | + } else { ?> |
|
57 | 57 | <span class="status success"></span> |
58 | 58 | <span class="crondate" title="<?php p($absolute_time);?>"> |
59 | 59 | <?php p($l->t("Last job ran %s.", [$relative_time]));?> |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | } else { ?> |
63 | 63 | <span class="status error"></span> |
64 | 64 | <?php p($l->t("Background job didn’t run yet!")); |
65 | - } ?> |
|
65 | + } ?> |
|
66 | 66 | </p> |
67 | 67 | <a target="_blank" rel="noreferrer noopener" class="icon-info" |
68 | 68 | title="<?php p($l->t('Open documentation'));?>" |
@@ -75,38 +75,38 @@ discard block |
||
75 | 75 | <p> |
76 | 76 | <input type="radio" name="mode" value="ajax" class="radio" |
77 | 77 | id="backgroundjobs_ajax" <?php if ($_['backgroundjobs_mode'] === "ajax") { |
78 | - print_unescaped('checked="checked"'); |
|
79 | - } ?>> |
|
78 | + print_unescaped('checked="checked"'); |
|
79 | + } ?>> |
|
80 | 80 | <label for="backgroundjobs_ajax">AJAX</label><br/> |
81 | 81 | <em><?php p($l->t("Execute one task with each page loaded.")); ?></em> |
82 | 82 | </p> |
83 | 83 | <p> |
84 | 84 | <input type="radio" name="mode" value="webcron" class="radio" |
85 | 85 | id="backgroundjobs_webcron" <?php if ($_['backgroundjobs_mode'] === "webcron") { |
86 | - print_unescaped('checked="checked"'); |
|
87 | - } ?>> |
|
86 | + print_unescaped('checked="checked"'); |
|
87 | + } ?>> |
|
88 | 88 | <label for="backgroundjobs_webcron">Webcron</label><br/> |
89 | 89 | <em><?php p($l->t("cron.php is registered at a webcron service to call cron.php every 5 minutes over HTTP.")); ?></em> |
90 | 90 | </p> |
91 | 91 | <p> |
92 | 92 | <input type="radio" name="mode" value="cron" class="radio" |
93 | 93 | id="backgroundjobs_cron" <?php if ($_['backgroundjobs_mode'] === "cron") { |
94 | - print_unescaped('checked="checked"'); |
|
95 | - } |
|
96 | - if (!$_['cli_based_cron_possible']) { |
|
97 | - print_unescaped('disabled'); |
|
98 | - }?>> |
|
94 | + print_unescaped('checked="checked"'); |
|
95 | + } |
|
96 | + if (!$_['cli_based_cron_possible']) { |
|
97 | + print_unescaped('disabled'); |
|
98 | + }?>> |
|
99 | 99 | <label for="backgroundjobs_cron">Cron</label><br/> |
100 | 100 | <em><?php p($l->t("Use system cron service to call the cron.php file every 5 minutes.")); ?> |
101 | 101 | <?php if ($_['cli_based_cron_possible']) { |
102 | - p($l->t('The cron.php needs to be executed by the system user "%s".', [$_['cli_based_cron_user']])); |
|
103 | - } else { |
|
104 | - print_unescaped(str_replace( |
|
105 | - ['{linkstart}', '{linkend}'], |
|
106 | - ['<a href="http://php.net/manual/en/book.posix.php">', ' ↗</a>'], |
|
107 | - $l->t('To run this you need the PHP POSIX extension. See {linkstart}PHP documentation{linkend} for more details.') |
|
108 | - )); |
|
109 | - } ?></em> |
|
102 | + p($l->t('The cron.php needs to be executed by the system user "%s".', [$_['cli_based_cron_user']])); |
|
103 | + } else { |
|
104 | + print_unescaped(str_replace( |
|
105 | + ['{linkstart}', '{linkend}'], |
|
106 | + ['<a href="http://php.net/manual/en/book.posix.php">', ' ↗</a>'], |
|
107 | + $l->t('To run this you need the PHP POSIX extension. See {linkstart}PHP documentation{linkend} for more details.') |
|
108 | + )); |
|
109 | + } ?></em> |
|
110 | 110 | |
111 | 111 | </p> |
112 | 112 | </fieldset> |