Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions apps/files_trashbin/lib/Command/ExpireTrash.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,14 @@ protected function configure(): void {
protected function execute(InputInterface $input, OutputInterface $output): int {
$minAge = $this->expiration->getMinAgeAsTimestamp();
$maxAge = $this->expiration->getMaxAgeAsTimestamp();
// Both minAge and maxAge resolve to `false` only when
// Expiration::isEnabled() is false, i.e. the retention policy is "disabled".
if ($minAge === false && $maxAge === false) {
$output->writeln('Auto expiration is configured - keeps files and folders in the trash bin for 30 days and automatically deletes anytime after that if space is needed (note: files may not be deleted if space is not needed)');
return 1;
$output->writeln(
'Trash bin expiration is disabled (trashbin_retention_obligation is set to "disabled"). '
. 'No files or folders will be automatically expired by this command.'
);
return 0;
}

$userIds = $input->getArgument('user_id');
Expand Down
Loading