mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-27 17:10:19 +00:00
Override night mode pref with night mode query string
Bug: T357329 Change-Id: I30766bced218208ddfe5c2990d7dac290441a1d0
This commit is contained in:
parent
42781512ec
commit
14a40c0be6
|
@ -168,7 +168,12 @@ class FeatureManager {
|
|||
$suffixDisabled = 'clientpref-0';
|
||||
break;
|
||||
case CONSTANTS::PREF_NIGHT_MODE:
|
||||
$suffixEnabled = 'clientpref-' . $this->getUserPreferenceValue( CONSTANTS::PREF_KEY_NIGHT_MODE );
|
||||
$request = RequestContext::getMain()->getRequest();
|
||||
$valueRequest = $request->getText( 'vectornightmode' );
|
||||
// If night mode query string is used, hardcode pref value to the night mode value
|
||||
$value = $valueRequest !== '' ? $valueRequest :
|
||||
$this->getUserPreferenceValue( CONSTANTS::PREF_KEY_NIGHT_MODE );
|
||||
$suffixEnabled = 'clientpref-' . $value;
|
||||
$suffixDisabled = 'clientpref-0';
|
||||
// Must be hardcoded to 'skin-night-mode' to be consistent with Minerva
|
||||
// So that editors can target the same class across skins
|
||||
|
|
Loading…
Reference in a new issue