mirror of
https://github.com/moodle/moodle.git
synced 2025-08-09 02:46:40 +02:00
Merge branch 'MDL-41767-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE
This commit is contained in:
commit
41a10883b6
1 changed files with 16 additions and 5 deletions
|
@ -778,14 +778,25 @@ class theme_config {
|
|||
continue;
|
||||
}
|
||||
|
||||
$plugincontent = '';
|
||||
// Add main stylesheet.
|
||||
$sheetfile = "$fulldir/styles.css";
|
||||
if (is_readable($sheetfile)) {
|
||||
$cssfiles['plugins'][$type.'_'.$plugin] = $sheetfile;
|
||||
}
|
||||
$sheetthemefile = "$fulldir/styles_{$this->name}.css";
|
||||
|
||||
// Create a list of candidate sheets from parents (direct parent last) and current theme.
|
||||
$candidates = array();
|
||||
foreach (array_reverse($this->parent_configs) as $parent_config) {
|
||||
$candidates[] = $parent_config->name;
|
||||
}
|
||||
$candidates[] = $this->name;
|
||||
|
||||
// Add the sheets found.
|
||||
foreach ($candidates as $candidate) {
|
||||
$sheetthemefile = "$fulldir/styles_{$candidate}.css";
|
||||
if (is_readable($sheetthemefile)) {
|
||||
$cssfiles['plugins'][$type.'_'.$plugin.'_'.$this->name] = $sheetthemefile;
|
||||
$cssfiles['plugins'][$type.'_'.$plugin.'_'.$candidate] = $sheetthemefile;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue