Remove preference "Show table of contents (for pages with more ...)"
authortonythomas01 <01tonythomas@gmail.com>
Thu, 5 Dec 2013 17:54:27 +0000 (23:24 +0530)
committerTyler Anthony Romeo <tylerromeo@gmail.com>
Fri, 24 Jan 2014 20:59:44 +0000 (12:59 -0800)
The table of contents box is auto-inserted, can trivially be hidden or
exposed on a per-page basis with __MAGICWORDS__, includes a sticky
[show|hide] link, and can be easily hidden with site-wide CSS as
necessary. It needlessly adds complexity and user interface clutter.

Bug: 52813
Change-Id: If2139317dae4aa980b373c73d7b81dac627b5af8

RELEASE-NOTES-1.23
includes/DefaultSettings.php
includes/Preferences.php
includes/resourceloader/ResourceLoaderUserCSSPrefsModule.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc

index b80a9a9..fdefa0b 100644 (file)
@@ -191,6 +191,8 @@ changes to languages because of Bugzilla reports.
    interface).
 * Option to mark hooks as deprecated has been added.
 * (bug 52811) Preference "Enable section editing via [edit] links" was removed.
+* (bug 52813) Preference "Show table of contents (for pages with more than
+  3 headings)" was removed.
 
 ==== Removed classes ====
 * FakeMemCachedClient (deprecated in 1.18)
index 09f30a4..9264947 100644 (file)
@@ -4005,7 +4005,6 @@ $wgDefaultUserOptions = array(
        'rows' => 25,
        'showhiddencats' => 0,
        'shownumberswatching' => 1,
-       'showtoc' => 1,
        'showtoolbar' => 1,
        'skin' => false,
        'stubthreshold' => 0,
index 8d6ee59..04e9114 100644 (file)
@@ -755,13 +755,6 @@ class Preferences {
                        'label-raw' => $context->msg( 'stub-threshold' )->text(), // Raw HTML message. Yay?
                );
 
-               if ( $wgAllowUserCssPrefs ) {
-                       $defaultPreferences['showtoc'] = array(
-                               'type' => 'toggle',
-                               'section' => 'rendering/advancedrendering',
-                               'label-message' => 'tog-showtoc',
-                       );
-               }
                $defaultPreferences['showhiddencats'] = array(
                        'type' => 'toggle',
                        'section' => 'rendering/advancedrendering',
index 12798f7..424afce 100644 (file)
@@ -77,9 +77,6 @@ class ResourceLoaderUserCSSPrefsModule extends ResourceLoaderModule {
                if ( $options['justify'] ) {
                        $rules[] = "#article, #bodyContent, #mw_content { text-align: justify; }\n";
                }
-               if ( !$options['showtoc'] ) {
-                       $rules[] = "#toc { display: none; }\n";
-               }
                if ( $options['editfont'] !== 'default' ) {
                        // Double-check that $options['editfont'] consists of safe characters only
                        if ( preg_match( '/^[a-zA-Z0-9_, -]+$/', $options['editfont'] ) ) {
index a3ff563..37e5fc8 100644 (file)
@@ -668,7 +668,6 @@ future releases. Also note that since each list value is wrapped in a unique
 'tog-showtoolbar'             => 'Show edit toolbar',
 'tog-editondblclick'          => 'Edit pages on double click',
 'tog-editsectiononrightclick' => 'Enable section editing by right clicking on section titles',
-'tog-showtoc'                 => 'Show table of contents (for pages with more than 3 headings)',
 'tog-rememberpassword'        => 'Remember my login on this browser (for a maximum of $1 {{PLURAL:$1|day|days}})',
 'tog-watchcreations'          => 'Add pages I create and files I upload to my watchlist',
 'tog-watchdefault'            => 'Add pages and files I edit to my watchlist',
index 620ecd2..ea45ee6 100644 (file)
@@ -38,7 +38,6 @@ $wgMessageStructure = array(
                'tog-showtoolbar',
                'tog-editondblclick',
                'tog-editsectiononrightclick',
-               'tog-showtoc',
                'tog-rememberpassword',
                'tog-watchcreations',
                'tog-watchdefault',