diff --git a/framework/core/src/Admin/Content/AdminPayload.php b/framework/core/src/Admin/Content/AdminPayload.php index 4b45fc711..94d8ea6b6 100644 --- a/framework/core/src/Admin/Content/AdminPayload.php +++ b/framework/core/src/Admin/Content/AdminPayload.php @@ -113,7 +113,7 @@ class AdminPayload } $document->payload['queueDriver'] = $this->appInfo->identifyQueueDriver(); - $document->payload['sessionDriver'] = $this->appInfo->identifySessionDriver(); + $document->payload['sessionDriver'] = $this->appInfo->identifySessionDriver(true); /** * Used in the admin user list. Implemented as this as it matches the API in flarum/statistics. diff --git a/framework/core/src/Foundation/ApplicationInfoProvider.php b/framework/core/src/Foundation/ApplicationInfoProvider.php index e032540ae..794378de5 100644 --- a/framework/core/src/Foundation/ApplicationInfoProvider.php +++ b/framework/core/src/Foundation/ApplicationInfoProvider.php @@ -157,7 +157,7 @@ class ApplicationInfoProvider * 2. If the configured session driver is invalid, fallback to the default one and mention it. * 3. If the actual used driver (i.e `session.handler`) is different from the current one (configured or default), mention it. */ - public function identifySessionDriver(): string + public function identifySessionDriver(bool $forWeb = false): string { /* * Get the configured driver and fallback to the default one. @@ -190,11 +190,11 @@ class ApplicationInfoProvider $handlerName = str_replace('sessionhandler', '', $handlerName); if ($driver !== $handlerName) { - return "$handlerName (Code override. Configured to $configuredDriver)"; + return $forWeb ? $handlerName : "$handlerName (Code override. Configured to $configuredDriver)"; } if ($driver !== $configuredDriver) { - return "$driver (Fallback default driver. Configured to invalid driver $configuredDriver)"; + return $forWeb ? $driver : "$driver (Fallback default driver. Configured to invalid driver $configuredDriver)"; } return $driver;