Remove URL parameter setlang from history when language is unchanged

This change allows to use the ULS language changer without getting a
dialog for restoring the old language.

This change requires that the module is also loaded in this case.

Change-Id: Ie5169e986d0362034ede122b0bc29ce7a4aa481e
This commit is contained in:
Fomafix committed 2019-12-19 20:32:25 +01:00
1 parent d31fddd8e7
commit 5fda459531
2 files changed
+7 -7

No files matched your search

@@ -162,11 +162,6 @@ class UniversalLanguageSelectorHooks {
return;
}
if ( $out->getLanguage()->getCode() === $languageToSet ) {
// If we are already using the preferred language, don't bother.
return;
}
$out->addModules( 'ext.uls.setlang' );
}