Skip to content

Commit 8e287a4

Browse files
authored
Merge pull request #38581 from nextcloud/fix-hint-posix
2 parents 27916de + cd03313 commit 8e287a4

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

apps/settings/src/components/BasicSettings/BackgroundJob.vue

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,21 +65,15 @@
6565
</NcCheckboxRadioSwitch>
6666
<em>{{ t('settings', 'cron.php is registered at a webcron service to call cron.php every 5 minutes over HTTP. Use case: Very small instance (1–5 users depending on the usage).') }}</em>
6767

68-
<NcCheckboxRadioSwitch v-if="cliBasedCronPossible"
69-
type="radio"
68+
<NcCheckboxRadioSwitch type="radio"
69+
:disabled="!cliBasedCronPossible"
7070
:checked.sync="backgroundJobsMode"
7171
value="cron"
7272
name="backgroundJobsMode"
7373
@update:checked="onBackgroundJobModeChanged">
7474
{{ t('settings', 'Cron (Recommended)') }}
7575
</NcCheckboxRadioSwitch>
76-
<em v-if="cliBasedCronPossible">{{ cronLabel }}</em>
77-
<em v-else>
78-
{{ t('settings', 'To run this you need the PHP POSIX extension. See {linkstart}PHP documentation{linkend} for more details.', {
79-
linkstart: '<a href="https://www.php.net/manual/en/book.posix.php">',
80-
linkend: '</a>',
81-
}) }}
82-
</em>
76+
<em v-html="cronLabel" />
8377
</NcSettingsSection>
8478
</template>
8579

@@ -125,9 +119,14 @@ export default {
125119
},
126120
computed: {
127121
cronLabel() {
128-
let desc = t('settings', 'Use system cron service to call the cron.php file every 5 minutes. Recommended for all instances.')
122+
let desc = t('settings', 'Use system cron service to call the cron.php file every 5 minutes.')
129123
if (this.cliBasedCronPossible) {
130-
desc += ' ' + t('settings', 'The cron.php needs to be executed by the system user "{user}".', { user: this.cliBasedCronUser })
124+
desc += '<br>' + t('settings', 'The cron.php needs to be executed by the system user "{user}".', { user: this.cliBasedCronUser })
125+
} else {
126+
desc += '<br>' + t('settings', 'The PHP POSIX extension is required. See {linkstart}PHP documentation{linkend} for more details.', {
127+
linkstart: '<a target="_blank" rel="noreferrer nofollow" class="external" href="https://www.php.net/manual/en/book.posix.php">',
128+
linkend: '</a>',
129+
}, undefined, { escape: false, sanitize: false })
131130
}
132131
return desc
133132
},

0 commit comments

Comments
 (0)