r110557 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110556‎ | r110557 | r110558 >
Date:10:30, 2 February 2012
Author:catrope
Status:ok
Tags:
Comment:
(bug 34114) CSSMin::remap() doesn't respect its $embed parameter. Patch by Gilles van den Hoven
Modified paths:
  • /trunk/phase3/CREDITS (modified) (history)
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/includes/libs/CSSMin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -242,6 +242,7 @@
243243 * (bug 33762) QueryPage-based special pages no longer misses *-summary message.
244244 * Other sizes links are no longer generated for wikis without a 404 thumbnail handler.
245245 * (bug 29454) Enforce byteLimit for page title input on Special:MovePage
 246+* (bug 34114) CSSMin::remap() doesn't respect its $embed parameter
246247
247248 === API changes in 1.19 ===
248249 * Made action=edit less likely to return "unknownerror", by returning the actual error
Index: trunk/phase3/CREDITS
@@ -108,6 +108,7 @@
109109 * FunPika
110110 * fomafix
111111 * Gero Scholz
 112+* Gilles van den Hoven
112113 * Grunny
113114 * Harry Burt
114115 * Ireas
Index: trunk/phase3/includes/libs/CSSMin.php
@@ -116,10 +116,10 @@
117117 * @param $source string CSS data to remap
118118 * @param $local string File path where the source was read from
119119 * @param $remote string URL path to the file
120 - * @param $embed ???
 120+ * @param $embedData bool If false, never do any data URI embedding, even if / * @embed * / is found
121121 * @return string Remapped CSS data
122122 */
123 - public static function remap( $source, $local, $remote, $embed = true ) {
 123+ public static function remap( $source, $local, $remote, $embedData = true ) {
124124 $pattern = '/((?P<embed>\s*\/\*\s*\@embed\s*\*\/)(?P<pre>[^\;\}]*))?' .
125125 self::URL_REGEX . '(?P<post>[^;]*)[\;]?/';
126126 $offset = 0;
@@ -166,7 +166,7 @@
167167 // using Z for the timezone, meaning GMT
168168 $url .= '?' . gmdate( 'Y-m-d\TH:i:s\Z', round( filemtime( $file ), -2 ) );
169169 // Embedding requires a bit of extra processing, so let's skip that if we can
170 - if ( $embed ) {
 170+ if ( $embedData && $embed ) {
171171 $type = self::getMimeType( $file );
172172 // Detect when URLs were preceeded with embed tags, and also verify file size is
173173 // below the limit

Status & tagging log