Skip to content

Commit

Permalink
yui combo MDLSITE-1032 Fixed relative paths to assets
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Hemelryk committed Oct 7, 2010
1 parent 1d4a834 commit 4d90912
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions theme/yui_combo.php
Expand Up @@ -98,6 +98,11 @@
// search for all images in gallery module CSS and serve them through the yui_image.php script
$filecontent = preg_replace('/([a-z_-]+)\.(png|gif)/', 'yui_image.php?file='.$version.'/'.$bits[0].'/'.$bits[1].'/$1.$2', $filecontent);
} else {
// First we need to remove relative paths to images. These are used by YUI modules to make use of global assets.
// I've added this as a separate regex so it can be easily removed once
// YUI standardise there CSS methods
$filecontent = preg_replace('#(\.\./\.\./\.\./\.\./assets/skins/sam/)?([a-z_-]+)\.(png|gif)#', '$2.$3', $filecontent);

// search for all images in yui2 CSS and serve them through the yui_image.php script
$filecontent = preg_replace('/([a-z_-]+)\.(png|gif)/', 'yui_image.php?file='.$version.'/$1.$2', $filecontent);
}
Expand Down

0 comments on commit 4d90912

Please sign in to comment.