Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch 'w07_MDL-26153_20_yuicombo' of git://github.com/skodak/m…

…oodle
  • Loading branch information...
commit 478d28181592e8c573b28ceb5bdc6304da5e8d4a 2 parents 102cb3c + 6e6034e
Eloy Lafuente (stronk7) stronk7 authored

Showing 1 changed file with 4 additions and 4 deletions. Show diff stats Hide diff stats

  1. +4 4 theme/yui_combo.php
8 theme/yui_combo.php
@@ -93,18 +93,18 @@
93 93
94 94 if ($mimetype === 'text/css') {
95 95 if ($version == 'moodle') {
96   - $filecontent = preg_replace('/([a-z_-]+)\.(png|gif)/', 'yui_image.php?file='.$version.'/'.$frankenstyle.'/'.array_shift($bits).'/$1.$2', $filecontent);
  96 + $filecontent = preg_replace('/([a-z0-9_-]+)\.(png|gif)/', 'yui_image.php?file='.$version.'/'.$frankenstyle.'/'.array_shift($bits).'/$1.$2', $filecontent);
97 97 } else if ($version == 'gallery') {
98 98 // search for all images in gallery module CSS and serve them through the yui_image.php script
99   - $filecontent = preg_replace('/([a-z_-]+)\.(png|gif)/', 'yui_image.php?file='.$version.'/'.$bits[0].'/'.$bits[1].'/$1.$2', $filecontent);
  99 + $filecontent = preg_replace('/([a-z0-9_-]+)\.(png|gif)/', 'yui_image.php?file='.$version.'/'.$bits[0].'/'.$bits[1].'/$1.$2', $filecontent);
100 100 } else {
101 101 // First we need to remove relative paths to images. These are used by YUI modules to make use of global assets.
102 102 // I've added this as a separate regex so it can be easily removed once
103 103 // YUI standardise there CSS methods
104   - $filecontent = preg_replace('#(\.\./\.\./\.\./\.\./assets/skins/sam/)?([a-z_-]+)\.(png|gif)#', '$2.$3', $filecontent);
  104 + $filecontent = preg_replace('#(\.\./\.\./\.\./\.\./assets/skins/sam/)?([a-z0-9_-]+)\.(png|gif)#', '$2.$3', $filecontent);
105 105
106 106 // search for all images in yui2 CSS and serve them through the yui_image.php script
107   - $filecontent = preg_replace('/([a-z_-]+)\.(png|gif)/', 'yui_image.php?file='.$version.'/$1.$2', $filecontent);
  107 + $filecontent = preg_replace('/([a-z0-9_-]+)\.(png|gif)/', 'yui_image.php?file='.$version.'/$1.$2', $filecontent);
108 108 }
109 109 }
110 110

0 comments on commit 478d281

Please sign in to comment.
Something went wrong with that request. Please try again.