aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2013-09-19 19:53:57 +0200
committerNils Adermann <naderman@naderman.de>2013-09-19 19:53:57 +0200
commit6b71284681483534a0c5511b689af1e8a0c9cdc9 (patch)
treee1c698c85b4076df1451fa7ccf055d1b7f5ae92d /phpBB
parent16fdef486676d0c624e452959b763cf99d8e4ade (diff)
downloadforums-6b71284681483534a0c5511b689af1e8a0c9cdc9.tar
forums-6b71284681483534a0c5511b689af1e8a0c9cdc9.tar.gz
forums-6b71284681483534a0c5511b689af1e8a0c9cdc9.tar.bz2
forums-6b71284681483534a0c5511b689af1e8a0c9cdc9.tar.xz
forums-6b71284681483534a0c5511b689af1e8a0c9cdc9.zip
[ticket/11700] Correctly load templates for extensions
PHPBB3-11700
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/functions_module.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php
index 80477684a8..b33f3d6866 100644
--- a/phpBB/includes/functions_module.php
+++ b/phpBB/includes/functions_module.php
@@ -499,12 +499,12 @@ class p_master
* the style paths for the extension (the ext author can change them
* if necessary).
*/
- $module_dir = explode('_', get_class($this->module));
+ $module_dir = explode('\\', get_class($this->module));
- // 0 phpbb, 1 ext, 2 vendor, 3 extension name, ...
- if (isset($module_dir[3]) && $module_dir[1] === 'ext')
+ // 0 vendor, 1 extension name, ...
+ if (isset($module_dir[1]))
{
- $module_style_dir = $phpbb_root_path . 'ext/' . $module_dir[2] . '/' . $module_dir[3] . '/adm/style';
+ $module_style_dir = $phpbb_root_path . 'ext/' . $module_dir[0] . '/' . $module_dir[1] . '/adm/style';
if (is_dir($module_style_dir))
{
@@ -973,7 +973,7 @@ class p_master
*/
protected function get_short_name($basename)
{
- if (substr($basename, 0, 6) === 'phpbb_')
+ if (substr($basename, 0, 6) === 'phpbb\\' || strpos($basename, '\\') !== false)
{
return $basename;
}
@@ -990,6 +990,6 @@ class p_master
*/
protected function is_full_class($basename)
{
- return (preg_match('/^(phpbb|ucp|mcp|acp)_/', $basename));
+ return (strpos($basename, '\\') !== false || preg_match('/^(ucp|mcp|acp)_/', $basename));
}
}