mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-12 19:54:12 +02:00
[ticket/10933] Add get_first_template_location.
This localizes template_path to style resource locator. locate function on template will be removed in a subsequent commit. PHPBB3-10933
This commit is contained in:
@@ -508,22 +508,8 @@ class phpbb_template
|
||||
*/
|
||||
public function locate($files, $return_default = false, $return_full_path = true)
|
||||
{
|
||||
// add template path prefix
|
||||
$templates = array();
|
||||
if (is_string($files))
|
||||
{
|
||||
$templates[] = $this->template_path . $files;
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach ($files as $file)
|
||||
{
|
||||
$templates[] = $this->template_path . $file;
|
||||
}
|
||||
}
|
||||
|
||||
// use resource locator to find files
|
||||
return $this->locator->get_first_file_location($templates, $return_default, $return_full_path);
|
||||
return $this->locator->get_first_template_location($files, $return_default, $return_full_path);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user