[feature/template-engine] Delete $style_name param from locator's set_custom_template.

This parameter was unused, it was only used by template's set_custom_template
to determine cache file prefix.

PHPBB3-9726
This commit is contained in:
Oleg Pudeyev 2011-08-04 21:24:40 -04:00
parent 13536f2be5
commit 1a6250d8b6
2 changed files with 3 additions and 5 deletions

View file

@ -114,10 +114,9 @@ class phpbb_template_locator
* Note: Templates are still compiled to phpBB's cache directory. * Note: Templates are still compiled to phpBB's cache directory.
* *
* @param string $template_path Path to template directory * @param string $template_path Path to template directory
* @param string $template_name Name of template
* @param string|bool $fallback_template_path Path to fallback template, or false to disable fallback * @param string|bool $fallback_template_path Path to fallback template, or false to disable fallback
*/ */
public function set_custom_template($template_path, $template_name, $fallback_template_path = false) public function set_custom_template($template_path, $fallback_template_path = false)
{ {
// Make sure $template_path has no ending slash // Make sure $template_path has no ending slash
if (substr($template_path, -1) == '/') if (substr($template_path, -1) == '/')

View file

@ -117,10 +117,9 @@ class phpbb_template
*/ */
public function set_custom_template($template_path, $style_name, $fallback_template_path = false) public function set_custom_template($template_path, $style_name, $fallback_template_path = false)
{ {
$this->locator->set_custom_template($template_path, $style_name, $fallback_template_path); $this->locator->set_custom_template($template_path, $fallback_template_path);
$template_name = $style_name;
$this->cachepath = $this->phpbb_root_path . 'cache/ctpl_' . str_replace('_', '-', $template_name) . '_'; $this->cachepath = $this->phpbb_root_path . 'cache/ctpl_' . str_replace('_', '-', $style_name) . '_';
$this->context = new phpbb_template_context(); $this->context = new phpbb_template_context();