GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • history
  • Trevor Parscal (WMF)
  • talk
  • contribs
  • 😂
  • talk
  • contribs
  • Catrope
  • talk
  • contribs

This view

  • Original page
  • New address

GeezerVison is showing static-codereview.wikimedia.org — r82156 MediaWiki - Code Review archive

r82156 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:< r82155‎ | r82156 | r82157 >
Date:00:49, 15 February 2011
Author:tparscal
Status:ok
Tags:
Comment:
Resolves remaining issues in r82000 with remapping relative CSS URLs that contained queries.
Modified paths:
  • /trunk/phase3/includes/libs/CSSMin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/libs/CSSMin.php
——@@ -36,7 +36,7 @@
3737 * which when base64 encoded will result in a 1/3 increase in size.
3838 */
3939 const EMBED_SIZE_LIMIT = 24576;
40 - const URL_REGEX = 'url\(\s*[\'"]?(?P<file>[^\?\)\'"]*)\??[^\)\'"]*[\'"]?\s*\)';
 40+ const URL_REGEX = 'url\(\s*[\'"]?(?P<file>[^\?\)\'"]*)(?P<query>\??[^\)\'"]*)[\'"]?\s*\)';
4141
4242 /* Protected Static Members */
4343
——@@ -130,6 +130,7 @@
131131 $embed = $match['embed'][0];
132132 $pre = $match['pre'][0];
133133 $post = $match['post'][0];
 134+ $query = $match['query'][0];
134135 $url = "{$remote}/{$match['file'][0]}";
135136 $file = "{$local}/{$match['file'][0]}";
136137 $replacement = false;
——@@ -163,7 +164,7 @@
164165 }
165166 } else if ( $local === false ) {
166167 // Assume that all paths are relative to $remote, and make them absolute
167 - $replacement = "{$embed}{$pre}url({$url}){$post};";
 168+ $replacement = "{$embed}{$pre}url({$url}{$query}){$post};";
168169 }
169170 if ( $replacement !== false ) {
170171 // Perform replacement on the source

Follow-up revisions

RevisionCommit summaryAuthorDate
r82218Followup r82156: skip relative URLs with absolute paths toocatrope06:27, 16 February 2011
r822201.17wmf1: MFT r80495, r80765, r81177, r82000, r82155, r82156, r82191, r82200,...catrope07:23, 16 February 2011
r85151MFT: r82000, r82004, r82020, r82025, r82038, r82039, r82048, r82070, r82081, ...demon20:39, 1 April 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r82000Resolves bug #27328 by supporting URL rewriting for CSS that comes from the W...tparscal22:57, 11 February 2011

Status & tagging log

  • 17:06, 7 April 2011 Trevor Parscal (WMF) (talk | contribs) changed the tags for r82156 [removed: roan]
  • 20:40, 1 April 2011 😂 (talk | contribs) changed the tags for r82156 [removed: 1.17]
  • 07:24, 16 February 2011 Catrope (talk | contribs) changed the tags for r82156 [removed: 1.17wmf1]
  • 07:23, 16 February 2011 Catrope (talk | contribs) changed the tags for r82156 [added: 1.17]
  • 07:23, 16 February 2011 Catrope (talk | contribs) changed the tags for r82156 [removed: 1.17]
  • 06:28, 16 February 2011 Catrope (talk | contribs) changed the tags for r82156 [added: 1.17]
  • 06:28, 16 February 2011 Catrope (talk | contribs) changed the status of r82156 [removed: new added: ok]
  • 22:07, 15 February 2011 Trevor Parscal (WMF) (talk | contribs) changed the tags for r82156 [removed: 1.17wm1 added: 1.17wmf1]
  • 22:07, 15 February 2011 Trevor Parscal (WMF) (talk | contribs) changed the tags for r82156 [added: 1.17wm1]
  • 22:07, 15 February 2011 Trevor Parscal (WMF) (talk | contribs) changed the tags for r82156 [removed: 1.17]
  • 22:06, 15 February 2011 Trevor Parscal (WMF) (talk | contribs) changed the tags for r82156 [added: roan,1.17]
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.