Skip to content

Commit

Permalink
Merge pull request #38581 from nextcloud/fix-hint-posix
Browse files Browse the repository at this point in the history
  • Loading branch information
Pytal committed Jul 31, 2023
2 parents 27916de + cd03313 commit 8e287a4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
21 changes: 10 additions & 11 deletions apps/settings/src/components/BasicSettings/BackgroundJob.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,15 @@
</NcCheckboxRadioSwitch>
<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>

<NcCheckboxRadioSwitch v-if="cliBasedCronPossible"
type="radio"
<NcCheckboxRadioSwitch type="radio"
:disabled="!cliBasedCronPossible"
:checked.sync="backgroundJobsMode"
value="cron"
name="backgroundJobsMode"
@update:checked="onBackgroundJobModeChanged">
{{ t('settings', 'Cron (Recommended)') }}
</NcCheckboxRadioSwitch>
<em v-if="cliBasedCronPossible">{{ cronLabel }}</em>
<em v-else>
{{ t('settings', 'To run this you need the PHP POSIX extension. See {linkstart}PHP documentation{linkend} for more details.', {
linkstart: '<a href="https://www.php.net/manual/en/book.posix.php">',
linkend: '</a>',
}) }}
</em>
<em v-html="cronLabel" />
</NcSettingsSection>
</template>

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

0 comments on commit 8e287a4

Please sign in to comment.