Global switch to disable toc generation
authorAlexander Ebert <ebert@woltlab.com>
Thu, 21 Jun 2018 18:20:25 +0000 (20:20 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 21 Jun 2018 18:20:25 +0000 (20:20 +0200)
See #2579

com.woltlab.wcf/option.xml
constants.php
wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeProcessor.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 09582ceddaab83e7645473a6f8c702b1355ee670..1566dba96bdf312656cf6b7735f83b51471305ef 100644 (file)
@@ -1500,6 +1500,12 @@ DESC:wcf.global.sortOrder.descending</selectoptions>
                                <minvalue>0</minvalue>
                                <maxvalue>255</maxvalue>
                        </option>
+                       
+                       <option name="message_enable_toc">
+                               <categoryname>message.general</categoryname>
+                               <optiontype>boolean</optiontype>
+                               <defaultvalue>1</defaultvalue>
+                       </option>
                        <!-- /message.general -->
                        
                        <option name="search_results_per_page">
index 5518ab92fcd03ec24045115d672f6b019df06164..19c0f160c1afcda3db3b16312dacc931ab5daf9b 100644 (file)
@@ -238,3 +238,4 @@ define('DESKTOP_NOTIFICATION_PACKAGE_ID', 1);
 define('PAGE_LOGO_LINK_TO_APP_DEFAULT', 1);
 define('MODULE_USER_COVER_PHOTO', 1);
 define('IMAGE_ALLOW_EXTERNAL_SOURCE', 0);
+define('MESSAGE_ENABLE_TOC', 1);
index d593883f2839498fd0960b2d07865cc4762a6865..759a30c8c3ce931397ac8ed50cfc7a004ed18562 100644 (file)
@@ -179,7 +179,7 @@ class HtmlOutputNodeProcessor extends AbstractHtmlNodeProcessor {
         */
        public function getHtml() {
                $toc = '';
-               if ($this->getHtmlProcessor()->enableToc && $this->outputType === 'text/html') {
+               if (MESSAGE_ENABLE_TOC && $this->getHtmlProcessor()->enableToc && $this->outputType === 'text/html') {
                        $context = $this->getHtmlProcessor()->getContext();
                        $idPrefix = substr(sha1($context['objectType'] . '-' . $context['objectID']), 0, 8);
                        
index 9633c0761ef0e2d0fc33119a37ab8e6cc1c356b0..0881ea36dc991bf8c99f4914277c23b91f5deb2c 100644 (file)
@@ -1444,6 +1444,7 @@ Als Benachrichtigungs-URL in der Konfiguration der sofortigen Zahlungsbestätigu
                <item name="wcf.acp.option.module_user_cover_photo"><![CDATA[Titelbilder aktivieren]]></item>
                <item name="wcf.acp.option.module_user_cover_photo.description"><![CDATA[Aktiviert die Darstellung und die Verwaltung von Titelbildern.]]></item>
                <item name="wcf.acp.option.image_allow_external_source"><![CDATA[Bilder von externen Seiten erlauben]]></item>
+               <item name="wcf.acp.option.message_enable_toc"><![CDATA[Inhaltsverzeichnisse aktivieren]]></item>
        </category>
        
        <category name="wcf.acp.customOption">
index d2566db97749d1b5d54fc5862dbc170f586db33f..ded15c36fe10a6b9b1ddcacec32cb5446d49468b 100644 (file)
@@ -1437,6 +1437,7 @@ When prompted for the notification URL for the instant payment notifications, pl
                <item name="wcf.acp.option.module_user_cover_photo"><![CDATA[Enable user cover photos]]></item>
                <item name="wcf.acp.option.module_user_cover_photo.description"><![CDATA[Enables the display and upload of user profile cover photos.]]></item>
                <item name="wcf.acp.option.image_allow_external_source"><![CDATA[Allow images from external sites]]></item>
+               <item name="wcf.acp.option.message_enable_toc"><![CDATA[Enable the table of contents]]></item>
        </category>
        
        <category name="wcf.acp.customOption">