diff --git a/includes/libraries/teampassclasses/configmanager/src/ConfigManager.php b/includes/libraries/teampassclasses/configmanager/src/ConfigManager.php index a3b54f120..b4f332a5c 100644 --- a/includes/libraries/teampassclasses/configmanager/src/ConfigManager.php +++ b/includes/libraries/teampassclasses/configmanager/src/ConfigManager.php @@ -30,6 +30,7 @@ use TeampassClasses\SessionManager\SessionManager; use DB; + class ConfigManager { private $settings; @@ -131,7 +132,7 @@ public function getLastModificationTimestamp(): string|null require_once __DIR__.'/../../../sergeytsalkov/meekrodb/db.class.php'; $maxTimestamp = DB::queryFirstField( - 'SELECT MAX(GREATEST(created_at, updated_at)) AS timestamp + 'SELECT GREATEST(MAX(created_at), MAX(updated_at)) AS timestamp FROM ' . prefixTable('misc') . ' WHERE type = %s', 'admin' diff --git a/sources/admin.queries.php b/sources/admin.queries.php index 761294dc5..235a326c4 100755 --- a/sources/admin.queries.php +++ b/sources/admin.queries.php @@ -2125,10 +2125,6 @@ $post_field ); - // Update session settings - $SETTINGS[$post_field] = $post_value; - $session->set('teampass-settings', $SETTINGS); - // in case of stats enabled, update the actual time if ($post_field === 'send_stats') { // Check if previous time exists, if not them insert this value in DB diff --git a/vendor/teampassclasses/configmanager/src/ConfigManager.php b/vendor/teampassclasses/configmanager/src/ConfigManager.php index 0a500e72e..b4f332a5c 100644 --- a/vendor/teampassclasses/configmanager/src/ConfigManager.php +++ b/vendor/teampassclasses/configmanager/src/ConfigManager.php @@ -132,7 +132,7 @@ public function getLastModificationTimestamp(): string|null require_once __DIR__.'/../../../sergeytsalkov/meekrodb/db.class.php'; $maxTimestamp = DB::queryFirstField( - 'SELECT MAX(GREATEST(created_at, updated_at)) AS timestamp + 'SELECT GREATEST(MAX(created_at), MAX(updated_at)) AS timestamp FROM ' . prefixTable('misc') . ' WHERE type = %s', 'admin'