aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/extension
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2011-10-14 00:44:48 +0200
committerNils Adermann <naderman@naderman.de>2011-10-14 00:44:48 +0200
commit639e3b9f17c9bac668b4ad24bb9861d8006fa396 (patch)
tree5be967133d7c513083633b910bcae9bdc2767af3 /phpBB/includes/extension
parent724f40f0f4fdfc47764a069cc91f045f0c67f4fb (diff)
downloadforums-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.php2
-rw-r--r--phpBB/includes/extension/manager.php5
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) . '/';
}
/**