Replace WebRequest::getText by WebRequest::getRawVal

The Unicode and line break normalizations of getText are not needed
here.

Change-Id: I53974627aec4b1b6724abb128a10c2a8d64059a9
This commit is contained in:
Fomafix 2024-05-07 07:19:13 +00:00
parent 48b497f09a
commit ca5c48052f

View file

@ -191,11 +191,11 @@ class FeatureManager {
}
$prefix = '';
$valueRequest = $request->getText( 'vectornightmode' );
$valueRequest = $request->getRawVal( 'vectornightmode' );
// If night mode query string is used, hardcode pref value to the night mode value
// NOTE: The query string parameter only works for logged in users.
// IF you have set a cookie locally this will be overriden.
$value = $valueRequest !== '' ? self::resolveNightModeQueryValue( $valueRequest ) :
$value = $valueRequest !== null ? self::resolveNightModeQueryValue( $valueRequest ) :
$this->getUserPreferenceValue( CONSTANTS::PREF_KEY_NIGHT_MODE );
$suffixEnabled = 'clientpref-' . $value;
$suffixDisabled = 'clientpref-day';