mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
parent
90a80b7b31
commit
0082dd8039
1 changed files with 0 additions and 37 deletions
|
@ -227,8 +227,6 @@ class manager
|
||||||
if ($active)
|
if ($active)
|
||||||
{
|
{
|
||||||
$this->config->increment('assets_version', 1);
|
$this->config->increment('assets_version', 1);
|
||||||
|
|
||||||
$this->update_template_paths($name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return !$active;
|
return !$active;
|
||||||
|
@ -591,39 +589,4 @@ class manager
|
||||||
}
|
}
|
||||||
return $finder;
|
return $finder;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Make the template aware of ACP template events of a newly enabled extension
|
|
||||||
*
|
|
||||||
* @param string $name The extension's name
|
|
||||||
* @return null
|
|
||||||
*/
|
|
||||||
protected function update_template_paths($name)
|
|
||||||
{
|
|
||||||
if (!$this->container->has('template'))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$possible_paths = array(
|
|
||||||
$this->phpbb_root_path . 'ext/' . $name . '/adm/style',
|
|
||||||
$this->phpbb_root_path . 'ext/' . $name . '/styles',
|
|
||||||
);
|
|
||||||
|
|
||||||
$paths = array_filter($possible_paths, 'is_dir');
|
|
||||||
|
|
||||||
if ($paths)
|
|
||||||
{
|
|
||||||
$names = array(
|
|
||||||
array(
|
|
||||||
'name' => 'adm',
|
|
||||||
'ext_path' => 'adm/style/',
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
$paths[] = $this->phpbb_root_path . 'adm/style';
|
|
||||||
|
|
||||||
$this->container->get('template')->set_custom_style($names, $paths);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue