-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(dav): fix event birthday alarms not being updated #39977
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
* | ||
* @author Arthur Schiwon <[email protected]> | ||
* @author Georg Ehrke <[email protected]> | ||
* @author Thomas Citharel <[email protected]> | ||
* | ||
* @license GNU AGPL version 3 or any later version | ||
* | ||
|
@@ -30,36 +31,22 @@ | |
use OCP\Migration\IRepairStep; | ||
|
||
class RegenerateBirthdayCalendars implements IRepairStep { | ||
private IJobList $jobList; | ||
private IConfig $config; | ||
|
||
/** @var IJobList */ | ||
private $jobList; | ||
|
||
/** @var IConfig */ | ||
private $config; | ||
|
||
/** | ||
* @param IJobList $jobList | ||
* @param IConfig $config | ||
*/ | ||
public function __construct(IJobList $jobList, | ||
IConfig $config) { | ||
$this->jobList = $jobList; | ||
$this->config = $config; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getName() { | ||
public function getName(): string { | ||
return 'Regenerating birthday calendars to use new icons and fix old birthday events without year'; | ||
} | ||
|
||
/** | ||
* @param IOutput $output | ||
*/ | ||
public function run(IOutput $output) { | ||
public function run(IOutput $output): void { | ||
// only run once | ||
if ($this->config->getAppValue('dav', 'regeneratedBirthdayCalendarsForYearFix') === 'yes') { | ||
if ($this->config->getAppValue('dav', 'regeneratedBirthdayCalendarsForYearFix') === 'yes' && $this->config->getAppValue('dav', 'regeneratedBirthdayCalendarsForAlarmFix') === 'yes') { | ||
Check notice Code scanning / Psalm DeprecatedMethod Note
The method OCP\IConfig::getAppValue has been marked as deprecated
Check notice Code scanning / Psalm DeprecatedMethod Note
The method OCP\IConfig::getAppValue has been marked as deprecated
|
||
$output->info('Repair step already executed'); | ||
return; | ||
} | ||
|
@@ -69,5 +56,6 @@ | |
|
||
// if all were done, no need to redo the repair during next upgrade | ||
$this->config->setAppValue('dav', 'regeneratedBirthdayCalendarsForYearFix', 'yes'); | ||
$this->config->setAppValue('dav', 'regeneratedBirthdayCalendarsForAlarmFix', 'yes'); | ||
Check notice Code scanning / Psalm DeprecatedMethod Note
The method OCP\IConfig::setAppValue has been marked as deprecated
|
||
} | ||
} |
Check notice
Code scanning / Psalm
PossiblyNullPropertyFetch Note