From e89831fc1c0829f775bf95b3bf38c551482fab94 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Thu, 25 Jun 2009 11:00:19 +0000 Subject: [PATCH] Prevent showTocToggle() from inserting the show/hide link twice --- includes/DefaultSettings.php | 2 +- skins/common/wikibits.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index c67bd661a0..43962857b3 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -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: diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js index 5e8e6adafd..b81196f33e 100644 --- a/skins/common/wikibits.js +++ b/skins/common/wikibits.js @@ -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; } -- 2.20.1