From: Roan Kattouw Date: Thu, 25 Jun 2009 11:00:19 +0000 (+0000) Subject: Prevent showTocToggle() from inserting the show/hide link twice X-Git-Tag: 1.31.0-rc.0~41215 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=e89831fc1c0829f775bf95b3bf38c551482fab94;p=lhc%2Fweb%2Fwiklou.git Prevent showTocToggle() from inserting the show/hide link twice --- 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; }