mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-25 19:38:53 +00:00
[feature/template-events] Generate style names array in set_style.
PHPBB3-9550
This commit is contained in:
parent
44d6dc4c4c
commit
729eeef2bf
1 changed files with 12 additions and 6 deletions
|
@ -91,16 +91,22 @@ class phpbb_style
|
||||||
{
|
{
|
||||||
$style_path = $this->user->style['style_path'];
|
$style_path = $this->user->style['style_path'];
|
||||||
$style_dirs = ($this->user->style['style_parent_id']) ? array_reverse(explode('/', $this->user->style['style_parent_tree'])) : array();
|
$style_dirs = ($this->user->style['style_parent_id']) ? array_reverse(explode('/', $this->user->style['style_parent_tree'])) : array();
|
||||||
$paths = array($this->get_style_path($style_path));
|
|
||||||
|
$names = array($style_path);
|
||||||
foreach ($style_dirs as $dir)
|
foreach ($style_dirs as $dir)
|
||||||
{
|
{
|
||||||
$paths[] = $this->get_style_path($dir);
|
$names[] = $dir;
|
||||||
|
}
|
||||||
|
// Add 'all' path, used as last fallback path by hooks and extensions
|
||||||
|
//$names[] = 'all';
|
||||||
|
|
||||||
|
$paths = array();
|
||||||
|
foreach ($names as $name)
|
||||||
|
{
|
||||||
|
$paths[] = $this->get_style_path($name);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add 'all' path, used as last fallback path by hooks and extensions
|
return $this->set_custom_style($style_path, $names, $paths);
|
||||||
$paths[] = $this->get_style_path('all');
|
|
||||||
|
|
||||||
return $this->set_custom_style($style_path, $paths);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue