Prevent showTocToggle() from inserting the show/hide link twice
authorRoan Kattouw <catrope@users.mediawiki.org>
Thu, 25 Jun 2009 11:00:19 +0000 (11:00 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Thu, 25 Jun 2009 11:00:19 +0000 (11:00 +0000)
includes/DefaultSettings.php
skins/common/wikibits.js

index c67bd66..4396285 100644 (file)
@@ -1496,7 +1496,7 @@ $wgCacheEpoch = '20030516000000';
  * to ensure that client-side caches do not keep obsolete copies of global
  * styles.
  */
-$wgStyleVersion = '227';
+$wgStyleVersion = '228';
 
 
 # Server-side caching:
index 5e8e6ad..b81196f 100644 (file)
@@ -114,7 +114,9 @@ function showTocToggle() {
                // Uses DOM calls to avoid document.write + XHTML issues
 
                var linkHolder = document.getElementById('toctitle');
-               if (!linkHolder) {
+               var existingLink = document.getElementById('togglelink');
+               if (!linkHolder || existingLink) {
+                       // Don't add the toggle link twice
                        return;
                }