mediawiki.special.preferences: Allow linking to subsections
authorBartosz Dziewoński <matma.rex@gmail.com>
Fri, 15 Sep 2017 20:35:46 +0000 (22:35 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Sat, 16 Sep 2017 13:23:36 +0000 (15:23 +0200)
commit5fe2e19ac33335458b658388a34f48bde63c1787
treeb6067c7570719fab000a9463f3fc419cc241b614
parent265ff105aaa814c828a35e599ed35d0b0bb00e53
mediawiki.special.preferences: Allow linking to subsections

The fix for T54469 allowed linking to individual fields, but not to
subsections.

The subsections have an id prefixed with 'mw-prefsection', like the
main sections, so the 'else' case was never triggered and they were
never handled. Fix the 'if' case condition to not match them.

Also, do not rely on the 'prefsection' class, which is (according to
the comment at the top of this file) only "for backwards compatibility
with older skins".

Change-Id: Ie7b4e3afbbe723a4e3b01aac95476b073a7213cd
resources/src/mediawiki.special/mediawiki.special.preferences.js