r52391 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52390‎ | r52391 | r52392 >
Date:11:00, 25 June 2009
Author:catrope
Status:ok
Tags:
Comment:
Prevent showTocToggle() from inserting the show/hide link twice
Modified paths:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/skins/common/wikibits.js (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/wikibits.js
@@ -114,7 +114,9 @@
115115 // Uses DOM calls to avoid document.write + XHTML issues
116116
117117 var linkHolder = document.getElementById('toctitle');
118 - if (!linkHolder) {
 118+ var existingLink = document.getElementById('togglelink');
 119+ if (!linkHolder || existingLink) {
 120+ // Don't add the toggle link twice
119121 return;
120122 }
121123
Index: trunk/phase3/includes/DefaultSettings.php
@@ -1496,7 +1496,7 @@
14971497 * to ensure that client-side caches do not keep obsolete copies of global
14981498 * styles.
14991499 */
1500 -$wgStyleVersion = '227';
 1500+$wgStyleVersion = '228';
15011501
15021502
15031503 # Server-side caching:

Status & tagging log