r83897 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83896‎ | r83897 | r83898 >
Date:14:25, 14 March 2011
Author:catrope
Status:ok
Tags:
Comment:
(bug 27054) Implicit end of statement can break stuff when files are combined. Applied patch by Paul Copperman: add a semicolon to the end of every module when combining; this'll terminate any unterminated final statement, and otherwise create a harmless empty statement.
Modified paths:
  • /trunk/phase3/includes/resourceloader/ResourceLoader.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/resourceloader/ResourceLoader.php
@@ -468,7 +468,9 @@
469469 // Scripts
470470 $scripts = '';
471471 if ( $context->shouldIncludeScripts() ) {
472 - $scripts .= $module->getScript( $context ) . "\n";
 472+ // bug 27054: Append semicolon to prevent weird bugs
 473+ // caused by files not terminating their statements right
 474+ $scripts .= $module->getScript( $context ) . ";\n";
473475 }
474476
475477 // Styles

Follow-up revisions

RevisionCommit summaryAuthorDate
r846131.17wmf1: MFT r81692, r82468, r83814, r83885, r83891, r83897, r83902, r83903,...catrope17:42, 23 March 2011
r85434MFT: r83885, r83891, r83897, r83902, r83903, r83934, r83965, r83979, r83988, ...demon13:38, 5 April 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r81228SVGEdit extension UI prettification, fixes....brion03:46, 31 January 2011

Status & tagging log