mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 16:56:44 +02:00
[feature/extension-manager] Support for loading language files from extensions
The referenced extension needs to be explicitly specified in an add_lang_ext() call. PHPBB3-10323
This commit is contained in:
@@ -268,7 +268,7 @@ class phpbb_extension_finder
|
||||
* @param bool $is_dir Whether the found items should be directories
|
||||
* @return array An array of paths to found items
|
||||
*/
|
||||
protected function find($cache = true, $is_dir = false)
|
||||
public function find($cache = true, $is_dir = false)
|
||||
{
|
||||
$this->query['is_dir'] = $is_dir;
|
||||
$query = md5(serialize($this->query));
|
||||
|
@@ -89,11 +89,12 @@ class phpbb_extension_manager
|
||||
* Generates the path to an extension
|
||||
*
|
||||
* @param string $name The name of the extension
|
||||
* @param bool $phpbb_relative Whether the path should be relative to phpbb root
|
||||
* @return string Path to an extension
|
||||
*/
|
||||
public function get_extension_path($name)
|
||||
public function get_extension_path($name, $phpbb_relative = false)
|
||||
{
|
||||
return 'ext/' . basename($name) . '/';
|
||||
return (($phpbb_relative) ? $this->phpbb_root_path : '') . 'ext/' . basename($name) . '/';
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user