mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/10756] Removing path provider from template class
Removing path provider from template class because it is not used by template class PHPBB3-10756
This commit is contained in:
parent
ea3a2ef223
commit
6cecc91326
7 changed files with 10 additions and 15 deletions
|
@ -124,7 +124,8 @@ $phpbb_extension_manager = new phpbb_extension_manager($db, EXT_TABLE, $phpbb_ro
|
||||||
// Initialize style
|
// Initialize style
|
||||||
$phpbb_style_resource_locator = new phpbb_style_resource_locator();
|
$phpbb_style_resource_locator = new phpbb_style_resource_locator();
|
||||||
$phpbb_style_path_provider = new phpbb_style_extension_path_provider($phpbb_extension_manager, new phpbb_style_path_provider());
|
$phpbb_style_path_provider = new phpbb_style_extension_path_provider($phpbb_extension_manager, new phpbb_style_path_provider());
|
||||||
$template = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, $phpbb_style_path_provider);
|
|
||||||
|
$template = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator);
|
||||||
$phpbb_style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, $phpbb_style_path_provider, $template);
|
$phpbb_style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, $phpbb_style_path_provider, $template);
|
||||||
|
|
||||||
$phpbb_subscriber_loader = new phpbb_event_extension_subscriber_loader($phpbb_dispatcher, $phpbb_extension_manager);
|
$phpbb_subscriber_loader = new phpbb_event_extension_subscriber_loader($phpbb_dispatcher, $phpbb_extension_manager);
|
||||||
|
|
|
@ -134,7 +134,7 @@ class bbcode
|
||||||
|
|
||||||
$style_resource_locator = new phpbb_style_resource_locator();
|
$style_resource_locator = new phpbb_style_resource_locator();
|
||||||
$style_path_provider = new phpbb_style_extension_path_provider($phpbb_extension_manager, new phpbb_style_path_provider());
|
$style_path_provider = new phpbb_style_extension_path_provider($phpbb_extension_manager, new phpbb_style_path_provider());
|
||||||
$template = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator, $style_path_provider);
|
$template = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator);
|
||||||
$style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator, $style_path_provider, $template);
|
$style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator, $style_path_provider, $template);
|
||||||
$style->set_style();
|
$style->set_style();
|
||||||
$template->set_filenames(array('bbcode.html' => 'bbcode.html'));
|
$template->set_filenames(array('bbcode.html' => 'bbcode.html'));
|
||||||
|
|
|
@ -210,8 +210,10 @@ class messenger
|
||||||
{
|
{
|
||||||
$style_resource_locator = new phpbb_style_resource_locator();
|
$style_resource_locator = new phpbb_style_resource_locator();
|
||||||
$style_path_provider = new phpbb_style_extension_path_provider($phpbb_extension_manager, new phpbb_style_path_provider());
|
$style_path_provider = new phpbb_style_extension_path_provider($phpbb_extension_manager, new phpbb_style_path_provider());
|
||||||
$tpl = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator, $style_path_provider);
|
|
||||||
|
$tpl = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator);
|
||||||
$style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator, $style_path_provider, $tpl);
|
$style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator, $style_path_provider, $tpl);
|
||||||
|
|
||||||
$this->tpl_msg[$template_lang . $template_file] = $tpl;
|
$this->tpl_msg[$template_lang . $template_file] = $tpl;
|
||||||
|
|
||||||
$fallback_template_path = false;
|
$fallback_template_path = false;
|
||||||
|
|
|
@ -68,12 +68,6 @@ class phpbb_style_template
|
||||||
*/
|
*/
|
||||||
private $locator;
|
private $locator;
|
||||||
|
|
||||||
/**
|
|
||||||
* Template path provider
|
|
||||||
* @var phpbb_style_path_provider
|
|
||||||
*/
|
|
||||||
private $provider;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Location of templates directory within style directories
|
* Location of templates directory within style directories
|
||||||
* @var string
|
* @var string
|
||||||
|
@ -86,9 +80,8 @@ class phpbb_style_template
|
||||||
* @param string $phpbb_root_path phpBB root path
|
* @param string $phpbb_root_path phpBB root path
|
||||||
* @param user $user current user
|
* @param user $user current user
|
||||||
* @param phpbb_template_locator $locator template locator
|
* @param phpbb_template_locator $locator template locator
|
||||||
* @param phpbb_style_path_provider $provider style path provider
|
|
||||||
*/
|
*/
|
||||||
public function __construct($phpbb_root_path, $phpEx, $config, $user, phpbb_template_locator $locator, phpbb_style_path_provider_interface $provider)
|
public function __construct($phpbb_root_path, $phpEx, $config, $user, phpbb_template_locator $locator)
|
||||||
{
|
{
|
||||||
$this->phpbb_root_path = $phpbb_root_path;
|
$this->phpbb_root_path = $phpbb_root_path;
|
||||||
$this->phpEx = $phpEx;
|
$this->phpEx = $phpEx;
|
||||||
|
@ -96,7 +89,6 @@ class phpbb_style_template
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
$this->locator = $locator;
|
$this->locator = $locator;
|
||||||
$this->template_path = $this->locator->template_path;
|
$this->template_path = $this->locator->template_path;
|
||||||
$this->provider = $provider;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -202,7 +202,7 @@ $config = new phpbb_config(array(
|
||||||
|
|
||||||
$phpbb_style_resource_locator = new phpbb_style_resource_locator();
|
$phpbb_style_resource_locator = new phpbb_style_resource_locator();
|
||||||
$phpbb_style_path_provider = new phpbb_style_path_provider();
|
$phpbb_style_path_provider = new phpbb_style_path_provider();
|
||||||
$template = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, $phpbb_style_path_provider);
|
$template = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator);
|
||||||
$phpbb_style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, $phpbb_style_path_provider, $template);
|
$phpbb_style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, $phpbb_style_path_provider, $template);
|
||||||
$phpbb_style->set_ext_dir_prefix('adm/');
|
$phpbb_style->set_ext_dir_prefix('adm/');
|
||||||
$phpbb_style->set_custom_style('admin', '../adm/style', '');
|
$phpbb_style->set_custom_style('admin', '../adm/style', '');
|
||||||
|
|
|
@ -66,7 +66,7 @@ class phpbb_template_template_test_case extends phpbb_test_case
|
||||||
$this->template_path = dirname(__FILE__) . '/templates';
|
$this->template_path = dirname(__FILE__) . '/templates';
|
||||||
$this->style_resource_locator = new phpbb_style_resource_locator();
|
$this->style_resource_locator = new phpbb_style_resource_locator();
|
||||||
$this->style_provider = new phpbb_style_path_provider();
|
$this->style_provider = new phpbb_style_path_provider();
|
||||||
$this->template = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $this->style_resource_locator, $this->style_provider);
|
$this->template = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $this->style_resource_locator);
|
||||||
$this->style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $this->style_resource_locator, $this->style_provider, $this->template);
|
$this->style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $this->style_resource_locator, $this->style_provider, $this->template);
|
||||||
$this->style->set_custom_style('tests', $this->template_path, '');
|
$this->style->set_custom_style('tests', $this->template_path, '');
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ class phpbb_template_template_test_case_with_tree extends phpbb_template_templat
|
||||||
$this->parent_template_path = dirname(__FILE__) . '/parent_templates';
|
$this->parent_template_path = dirname(__FILE__) . '/parent_templates';
|
||||||
$this->style_resource_locator = new phpbb_style_resource_locator();
|
$this->style_resource_locator = new phpbb_style_resource_locator();
|
||||||
$this->style_provider = new phpbb_style_path_provider();
|
$this->style_provider = new phpbb_style_path_provider();
|
||||||
$this->template = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $this->style_resource_locator, $this->style_provider);
|
$this->template = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $this->style_resource_locator);
|
||||||
$this->style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $this->style_resource_locator, $this->style_provider, $this->template);
|
$this->style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $this->style_resource_locator, $this->style_provider, $this->template);
|
||||||
$this->style->set_custom_style('tests', array($this->template_path, $this->parent_template_path), '');
|
$this->style->set_custom_style('tests', array($this->template_path, $this->parent_template_path), '');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue