diff options
author | Nils Adermann <naderman@naderman.de> | 2011-10-14 00:44:48 +0200 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2011-10-14 00:44:48 +0200 |
commit | 639e3b9f17c9bac668b4ad24bb9861d8006fa396 (patch) | |
tree | 5be967133d7c513083633b910bcae9bdc2767af3 /phpBB/includes/extension | |
parent | 724f40f0f4fdfc47764a069cc91f045f0c67f4fb (diff) | |
download | forums-639e3b9f17c9bac668b4ad24bb9861d8006fa396.tar forums-639e3b9f17c9bac668b4ad24bb9861d8006fa396.tar.gz forums-639e3b9f17c9bac668b4ad24bb9861d8006fa396.tar.bz2 forums-639e3b9f17c9bac668b4ad24bb9861d8006fa396.tar.xz forums-639e3b9f17c9bac668b4ad24bb9861d8006fa396.zip |
[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
Diffstat (limited to 'phpBB/includes/extension')
-rw-r--r-- | phpBB/includes/extension/finder.php | 2 | ||||
-rw-r--r-- | phpBB/includes/extension/manager.php | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/phpBB/includes/extension/finder.php b/phpBB/includes/extension/finder.php index 0c8c5d337c..6084d2672a 100644 --- a/phpBB/includes/extension/finder.php +++ b/phpBB/includes/extension/finder.php @@ -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)); diff --git a/phpBB/includes/extension/manager.php b/phpBB/includes/extension/manager.php index ef714638c3..0b3189df96 100644 --- a/phpBB/includes/extension/manager.php +++ b/phpBB/includes/extension/manager.php @@ -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) . '/'; } /** |