r8767 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r8766‎ | r8767 | r8768 >
Date:02:42, 1 May 2005
Author:vibber
Status:old
Tags:
Comment:
* (bug 2024) JavaScript error for custom skins
Don't include the skinname.js message if it's not set for this skin.

Patch from Michael Keppler:
http://bugzilla.wikipedia.org/attachment.cgi?id=483
Modified paths:
  • /branches/REL1_4/phase3/RELEASE-NOTES (modified) (history)
  • /branches/REL1_4/phase3/includes/SkinTemplate.php (modified) (history)

Diff [purge]

Index: branches/REL1_4/phase3/includes/SkinTemplate.php
@@ -907,7 +907,14 @@
908908 $s = '/* generated javascript */';
909909 $s .= "var skin = '{$this->skinname}';\nvar stylepath = '{$wgStylePath}';";
910910 $s .= '/* MediaWiki:'.ucfirst($this->skinname)." */\n";
911 - $s .= wfMsg(ucfirst($this->skinname).'.js');
 911+
 912+ // avoid inclusion of non defined user JavaScript (with custom skins only)
 913+ // by checking for default message content
 914+ $msgKey = ucfirst($this->skinname).'.js';
 915+ $userJS = wfMsg($msgKey);
 916+ if ('<'.$msgKey.'>' != $userJS) {
 917+ $s .= $userJS;
 918+ }
912919
913920 wfProfileOut( $fname );
914921 return $s;
Index: branches/REL1_4/phase3/RELEASE-NOTES
@@ -551,6 +551,7 @@
552552 === 1.4.4 fixes ===
553553
554554 * (bug 725) Let dir="ltr" attribute work again in MonoBook on RTL languages
 555+* (bug 2024) Skip JavaScript error for custom skins where .js message not set
555556
556557
557558 === Caveats ===

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r8766* (bug 2024) JavaScript error for custom skins...vibber02:39, 1 May 2005

Status & tagging log