aboutsummaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2024-03-06 13:15:21 +0000
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2024-03-06 13:15:21 +0000
commit41b3733ff6b1dd9213c1fd610b1e2606f1294933 (patch)
treed18a613153ec1571cc0c2e8d6ca363c2f9caf05a /cli
parent3934e77abcfc0f62ce8102a197aff7fb94deac1d (diff)
fixes #3750
Closes #3750 Merge request studip/studip!2607
Diffstat (limited to 'cli')
-rw-r--r--cli/Commands/Fix/EndTimeWeeklyRecurredEvents.php40
-rwxr-xr-xcli/studip1
2 files changed, 0 insertions, 41 deletions
diff --git a/cli/Commands/Fix/EndTimeWeeklyRecurredEvents.php b/cli/Commands/Fix/EndTimeWeeklyRecurredEvents.php
deleted file mode 100644
index 40e7a2b..0000000
--- a/cli/Commands/Fix/EndTimeWeeklyRecurredEvents.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-
-namespace Studip\Cli\Commands\Fix;
-
-use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\Style\SymfonyStyle;
-
-class EndTimeWeeklyRecurredEvents extends Command
-{
- protected static $defaultName = 'fix:end-time-weekly-recurred-events';
-
- protected function configure(): void
- {
- $this->setDescription('Fix end time weekly recurred events');
- }
-
- protected function execute(InputInterface $input, OutputInterface $output): int
- {
- $io = new SymfonyStyle($input, $output);
- $events = \EventData::findBySQL("rtype = 'WEEKLY' AND IFNULL(count, 0) > 0");
- $cal_event = new \CalendarEvent();
-
- $i = 0;
-
- foreach ($events as $event) {
- $id = $event->getId();
- $cal_event->event = $event;
- $rrule = $cal_event->getRecurrence();
- $cal_event->setRecurrence($rrule);
- $event->expire = $cal_event->event->expire;
- $event->setId($id);
- $event->store();
- $i++;
- }
- $io->info('Wrong end time of recurrence fixed for ' . $i . ' events.');
- return Command::SUCCESS;
- }
-}
diff --git a/cli/studip b/cli/studip
index 9da3b94..d981bd9 100755
--- a/cli/studip
+++ b/cli/studip
@@ -36,7 +36,6 @@ $commands = [
Commands\Fix\Biest7789::class,
Commands\Fix\Biest7866::class,
Commands\Fix\Biest8136::class,
- Commands\Fix\EndTimeWeeklyRecurredEvents::class,
Commands\Fix\IconDimensions::class,
Commands\HelpContent\Migrate::class,
Commands\Migrate\MigrateList::class,