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
|
@ -774,22 +774,33 @@ class theme_config {
|
|||
$plugins = core_component::get_plugin_list($type);
|
||||
foreach ($plugins as $plugin=>$fulldir) {
|
||||
if (!empty($excludes[$type]) and is_array($excludes[$type])
|
||||
and in_array($plugin, $excludes[$type])) {
|
||||
and in_array($plugin, $excludes[$type])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$plugincontent = '';
|
||||
// Add main stylesheet.
|
||||
$sheetfile = "$fulldir/styles.css";
|
||||
if (is_readable($sheetfile)) {
|
||||
$cssfiles['plugins'][$type.'_'.$plugin] = $sheetfile;
|
||||
}
|
||||
$sheetthemefile = "$fulldir/styles_{$this->name}.css";
|
||||
if (is_readable($sheetthemefile)) {
|
||||
$cssfiles['plugins'][$type.'_'.$plugin.'_'.$this->name] = $sheetthemefile;
|
||||
|
||||
// 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.'_'.$candidate] = $sheetthemefile;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// find out wanted parent sheets
|
||||
$excludes = $this->resolve_excludes('parents_exclude_sheets');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue