diff --git a/components/ILIAS/Authentication/classes/class.ilSessionReminderCheck.php b/components/ILIAS/Authentication/classes/class.ilSessionReminderCheck.php index 98daacbc3b06..6782d488ba2b 100755 --- a/components/ILIAS/Authentication/classes/class.ilSessionReminderCheck.php +++ b/components/ILIAS/Authentication/classes/class.ilSessionReminderCheck.php @@ -43,7 +43,6 @@ public function __construct( ilIniFile $clientIni, ilLogger $logger, ClockInterface $utcClock, - private ilSetting $settings ) { $this->http = $http; $this->refinery = $refinery; diff --git a/components/ILIAS/Authentication/resources/sessioncheck.php b/components/ILIAS/Authentication/resources/sessioncheck.php index a494647d7f73..154fe92cf67a 100644 --- a/components/ILIAS/Authentication/resources/sessioncheck.php +++ b/components/ILIAS/Authentication/resources/sessioncheck.php @@ -41,7 +41,6 @@ $DIC['ilClientIniFile'], $DIC->logger()->auth(), (new DataFactory())->clock()->utc(), - $DIC->settings() ) )->handle() ); diff --git a/components/ILIAS/User/src/Setup/DBUpdateSteps10.php b/components/ILIAS/User/src/Setup/DBUpdateSteps10.php index daa1bd46fffa..023150a60853 100755 --- a/components/ILIAS/User/src/Setup/DBUpdateSteps10.php +++ b/components/ILIAS/User/src/Setup/DBUpdateSteps10.php @@ -89,7 +89,14 @@ public function step_3(): void ['common', 'session_reminder_enabled'] ); $session_reminder = $result->numRows() ? (bool) $this->db->fetchAssoc($result)['value'] : false; - if ($session_reminder) { + $query = 'SELECT * FROM settings WHERE module = %s AND keyword = %s'; + $result = $this->db->queryF( + $query, + [\ilDBConstants::T_TEXT, \ilDBConstants::T_TEXT], + ['common', 'session_reminder_lead_time'] + ); + $session_reminder_lead_time = $result->numRows() ? (int) $this->db->fetchAssoc($result)['value'] : null; + if ($session_reminder && !isset($session_reminder_lead_time)) { $query = 'INSERT INTO settings (module, keyword, value) VALUES (%s, %s, %s)'; $this->db->manipulateF( $query, @@ -103,11 +110,5 @@ public function step_3(): void ['common', 'session_reminder_enabled'] ); } - $query = 'INSERT INTO settings (module, keyword, value) VALUES (%s, %s, %s)'; - $this->db->manipulateF( - $query, - [\ilDBConstants::T_TEXT, \ilDBConstants::T_TEXT, \ilDBConstants::T_INTEGER], - ['common', 'session_reminder_lead_time', \ilSessionReminder::LEAD_TIME_DISABLED] - ); } }