dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a99d1f4
)
(bug 27328) Redo r82218 properly, expanding URLs with absolute paths
author
Roan Kattouw
<catrope@users.mediawiki.org>
Sat, 19 Feb 2011 14:58:16 +0000
(14:58 +0000)
committer
Roan Kattouw
<catrope@users.mediawiki.org>
Sat, 19 Feb 2011 14:58:16 +0000
(14:58 +0000)
includes/libs/CSSMin.php
patch
|
blob
|
history
diff --git
a/includes/libs/CSSMin.php
b/includes/libs/CSSMin.php
index
5cd5a7d
..
faea551
100644
(file)
--- a/
includes/libs/CSSMin.php
+++ b/
includes/libs/CSSMin.php
@@
-126,6
+126,17
@@
class CSSMin {
$offset = $match[0][1] + strlen( $match[0][0] );
continue;
}
$offset = $match[0][1] + strlen( $match[0][0] );
continue;
}
+ // URLs with absolute paths like /w/index.php need to be expanded
+ // to absolute URLs but otherwise left alone
+ if ( $match['file'][0] !== '' && $match['file'][0][0] === '/' ) {
+ // Replace the file path with an expanded URL
+ $source = substr_replace( $source, wfExpandUrl( $match['file'][0] ),
+ $match['file'][1], strlen( $match['file'][0] )
+ );
+ // Move the offset to the end of the match, leaving it alone
+ $offset = $match[0][1] + strlen( $match[0][0] );
+ continue;
+ }
// Shortcuts
$embed = $match['embed'][0];
$pre = $match['pre'][0];
// Shortcuts
$embed = $match['embed'][0];
$pre = $match['pre'][0];