Merge branch 'MDL-44933-master' of git://github.com/FMCorz/moodle

This commit is contained in:
Sam Hemelryk
2014-04-08 11:38:13 +12:00
+13 -2
View File
@@ -678,10 +678,10 @@ class theme_config {
$urls = array();
$svg = $this->use_svg_icons();
$separate = (core_useragent::is_ie() && !core_useragent::check_ie_version('10'));
if ($rev > -1) {
$url = new moodle_url("$CFG->httpswwwroot/theme/styles.php");
$separate = (core_useragent::is_ie() && !core_useragent::check_ie_version('10'));
if (!empty($CFG->slasharguments)) {
$slashargs = '';
if (!$svg) {
@@ -717,6 +717,10 @@ class theme_config {
// We do this because all modern browsers support SVG and this param will one day be removed.
$baseurl->param('svg', '0');
}
if ($separate) {
// We might need to chunk long files.
$baseurl->param('chunk', '0');
}
if (core_useragent::is_ie()) {
// Lalala, IE does not allow more than 31 linked CSS files from main document.
$urls[] = new moodle_url($baseurl, array('theme'=>$this->name, 'type'=>'ie', 'subtype'=>'plugins'));
@@ -726,7 +730,7 @@ class theme_config {
}
if (!empty($this->lessfile)) {
// No need to define the type as IE here.
$urls[] = new moodle_url($baseurl, array('theme' => $this->name, 'type' => 'less', 'chunk' => 0));
$urls[] = new moodle_url($baseurl, array('theme' => $this->name, 'type' => 'less'));
}
$urls[] = new moodle_url($baseurl, array('theme'=>$this->name, 'type'=>'ie', 'subtype'=>'theme'));
@@ -853,6 +857,13 @@ class theme_config {
}
} else if ($subtype === 'theme') {
$cssfiles = $css['theme'];
foreach ($cssfiles as $key => $value) {
if ($this->lessfile && $key === $this->lessfile) {
// Remove the LESS file from the theme CSS files.
// The LESS files use the type 'less', not 'ie'.
unset($cssfiles[$key]);
}
}
}
} else if ($type === 'plugin') {