aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_module.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2011-08-29 20:54:42 -0400
committerNils Adermann <naderman@naderman.de>2011-09-29 15:42:49 +0200
commitfe4b8818ec1f448d5625534e5027cfbc1177ab9a (patch)
treed97f32577cc84f26161b7634ebae17da6c4f1f74 /phpBB/includes/functions_module.php
parentc785ef7aa7953c5e533e48b11ef13d6b1f344813 (diff)
downloadforums-fe4b8818ec1f448d5625534e5027cfbc1177ab9a.tar
forums-fe4b8818ec1f448d5625534e5027cfbc1177ab9a.tar.gz
forums-fe4b8818ec1f448d5625534e5027cfbc1177ab9a.tar.bz2
forums-fe4b8818ec1f448d5625534e5027cfbc1177ab9a.tar.xz
forums-fe4b8818ec1f448d5625534e5027cfbc1177ab9a.zip
[feature/extension-manager] Always store the full class name as module basename
The updater swaps out all basenames. PHPBB3-10323
Diffstat (limited to 'phpBB/includes/functions_module.php')
-rw-r--r--phpBB/includes/functions_module.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php
index 1a6b57794a..4d575a7e3a 100644
--- a/phpBB/includes/functions_module.php
+++ b/phpBB/includes/functions_module.php
@@ -441,18 +441,19 @@ class p_master
}
// new modules use the full class names, old ones are always called <type>_<name>, e.g. acp_board
- if (!class_exists($this->p_name) && !class_exists("{$this->p_class}_$this->p_name"))
+ if (!class_exists($this->p_name))
{
- if (!file_exists("$module_path/{$this->p_class}_$this->p_name.$phpEx"))
+ if (!file_exists("$module_path/{$this->p_name}.$phpEx"))
{
- trigger_error("Cannot find module $module_path/{$this->p_class}_$this->p_name.$phpEx", E_USER_ERROR);
+
+ trigger_error("Cannot find module $module_path/{$this->p_name}.$phpEx", E_USER_ERROR);
}
- include("$module_path/{$this->p_class}_$this->p_name.$phpEx");
+ include("$module_path/{$this->p_name}.$phpEx");
- if (!class_exists("{$this->p_class}_$this->p_name"))
+ if (!class_exists($this->p_name))
{
- trigger_error("Module file $module_path/{$this->p_class}_$this->p_name.$phpEx does not contain correct class [{$this->p_class}_$this->p_name]", E_USER_ERROR);
+ trigger_error("Module file $module_path/{$this->p_name}.$phpEx does not contain correct class [{$this->p_name}]", E_USER_ERROR);
}
}
@@ -462,7 +463,7 @@ class p_master
}
// Create a new instance of the desired module ...
- $class_name = (class_exists($this->p_name)) ? $this->p_name : "{$this->p_class}_$this->p_name";
+ $class_name = $this->p_name;
$this->module = new $class_name($this);