diff options
author | Nils Adermann <naderman@naderman.de> | 2012-01-06 17:20:41 +0100 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2012-01-06 17:45:42 +0100 |
commit | ffde8c8e06c4d37bef5cde280d520c0791ed2c67 (patch) | |
tree | 7f354595f1f75127a547159d6fd8da00ece5d818 | |
parent | 466acfdd943e37a3e1d98b12143894274fea9143 (diff) | |
download | forums-ffde8c8e06c4d37bef5cde280d520c0791ed2c67.tar forums-ffde8c8e06c4d37bef5cde280d520c0791ed2c67.tar.gz forums-ffde8c8e06c4d37bef5cde280d520c0791ed2c67.tar.bz2 forums-ffde8c8e06c4d37bef5cde280d520c0791ed2c67.tar.xz forums-ffde8c8e06c4d37bef5cde280d520c0791ed2c67.zip |
[ticket/10477] Normalize loaded module names to be class names or xcp_ prefixed
PHPBB3-10477
-rw-r--r-- | phpBB/includes/functions_module.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php index d810285313..a6015b1eac 100644 --- a/phpBB/includes/functions_module.php +++ b/phpBB/includes/functions_module.php @@ -804,6 +804,13 @@ class p_master */ function load($class, $name, $mode = false) { + // new modules use the full class names, old ones are always called <class>_<name>, e.g. acp_board + // in the latter case this function may be called as load(acp, board) + if (!class_exists($name) && substr($name, 0, strlen($class) + 1) !== $class . '_') + { + $name = $class . '_' . $name; + } + $this->p_class = $class; $this->p_name = $name; |