mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 16:56:44 +02:00
[ticket/16944] Handle bundling of iconify icons in ACP
PHPBB3-16944
This commit is contained in:
@@ -270,6 +270,10 @@ class acp_extensions
|
||||
), array($this->phpbb_root_path . 'adm/style'));
|
||||
|
||||
$this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_EXT_ENABLE', time(), array($ext_name));
|
||||
|
||||
// Force rebuild of iconify bundle
|
||||
$iconify_bundler = new \phpbb\assets\iconify_bundler($this->db, $this->ext_manager, $this->log, $this->phpbb_root_path);
|
||||
$iconify_bundler->get_bundle(true);
|
||||
}
|
||||
catch (\phpbb\db\migration\exception $e)
|
||||
{
|
||||
@@ -316,6 +320,10 @@ class acp_extensions
|
||||
}
|
||||
$this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_EXT_DISABLE', time(), array($ext_name));
|
||||
|
||||
// Force rebuild of iconify bundle
|
||||
$iconify_bundler = new \phpbb\assets\iconify_bundler($this->db, $this->ext_manager, $this->log, $this->phpbb_root_path);
|
||||
$iconify_bundler->get_bundle(true);
|
||||
|
||||
$this->tpl_name = 'acp_ext_disable';
|
||||
|
||||
$this->template->assign_vars([
|
||||
|
@@ -65,6 +65,9 @@ class acp_styles
|
||||
/** @var \phpbb\event\dispatcher_interface */
|
||||
protected $dispatcher;
|
||||
|
||||
/** @var \phpbb\assets\iconify_bundler */
|
||||
protected $iconify_bundler;
|
||||
|
||||
public function main($id, $mode)
|
||||
{
|
||||
global $db, $phpbb_admin_path, $phpbb_root_path, $phpEx, $template, $request, $cache, $auth, $config, $phpbb_dispatcher, $phpbb_container;
|
||||
@@ -80,6 +83,7 @@ class acp_styles
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
$this->php_ext = $phpEx;
|
||||
$this->dispatcher = $phpbb_dispatcher;
|
||||
$this->iconify_bundler = $phpbb_container->get('assets.iconify_bundler');
|
||||
|
||||
$this->default_style = $config['default_style'];
|
||||
$this->styles_path = $this->phpbb_root_path . $this->styles_path_absolute . '/';
|
||||
@@ -240,6 +244,9 @@ class acp_styles
|
||||
$this->text_formatter_cache->invalidate();
|
||||
}
|
||||
|
||||
// Force rebuild of iconify bundle
|
||||
$this->iconify_bundler->get_bundle(true);
|
||||
|
||||
// Show message
|
||||
if (!count($messages))
|
||||
{
|
||||
@@ -331,7 +338,7 @@ class acp_styles
|
||||
$rows = $this->db->sql_fetchrowset($result);
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
// Uinstall each style
|
||||
// Uninstall each style
|
||||
$uninstalled = array();
|
||||
foreach ($rows as $style)
|
||||
{
|
||||
@@ -367,6 +374,9 @@ class acp_styles
|
||||
// Clear cache
|
||||
$this->cache->purge();
|
||||
|
||||
// Force rebuild of iconify bundle
|
||||
$this->iconify_bundler->get_bundle(true);
|
||||
|
||||
// Show message
|
||||
trigger_error(implode('<br />', $messages) . adm_back_link($this->u_action), E_USER_NOTICE);
|
||||
}
|
||||
|
Reference in New Issue
Block a user