aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_modules.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2008-05-29 12:25:56 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2008-05-29 12:25:56 +0000
commit2f4a618900e2c3b6ea14c68cbeb5897cd2ac1a04 (patch)
tree3b7ea329bf35eab5ddab9b0b5eb790e45e283a5c /phpBB/includes/acp/acp_modules.php
parent91b4fe1868ca2c4d81111943f781e3cfd0262ef2 (diff)
downloadforums-2f4a618900e2c3b6ea14c68cbeb5897cd2ac1a04.tar
forums-2f4a618900e2c3b6ea14c68cbeb5897cd2ac1a04.tar.gz
forums-2f4a618900e2c3b6ea14c68cbeb5897cd2ac1a04.tar.bz2
forums-2f4a618900e2c3b6ea14c68cbeb5897cd2ac1a04.tar.xz
forums-2f4a618900e2c3b6ea14c68cbeb5897cd2ac1a04.zip
ok... i hope i haven't messed too much with the code and everything is still working.
Changes: - Ascraeus now uses constants for the phpbb root path and the php extension. This ensures more security for external applications and modifications (no more overwriting of root path and extension possible through insecure mods and register globals enabled) as well as no more globalizing needed. - A second change implemented here is an additional short-hand-notation for append_sid(). It is allowed to omit the root path and extension now (for example calling append_sid('memberlist')) - in this case the root path and extension get added automatically. The hook is called after these are added. git-svn-id: file:///svn/phpbb/trunk@8572 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_modules.php')
-rw-r--r--phpBB/includes/acp/acp_modules.php13
1 files changed, 5 insertions, 8 deletions
diff --git a/phpBB/includes/acp/acp_modules.php b/phpBB/includes/acp/acp_modules.php
index f3540941df..0ab8ac6f6b 100644
--- a/phpBB/includes/acp/acp_modules.php
+++ b/phpBB/includes/acp/acp_modules.php
@@ -37,8 +37,7 @@ class acp_modules
function main($id, $mode)
{
- global $db, $user, $auth, $template, $module;
- global $config, $phpbb_admin_path, $phpbb_root_path, $phpEx;
+ global $db, $user, $auth, $template, $module, $config;
// Set a global define for modules we might include (the author is able to prevent execution of code by checking this constant)
define('MODULE_INCLUDE', true);
@@ -530,11 +529,9 @@ class acp_modules
*/
function get_module_infos($module = '', $module_class = false)
{
- global $phpbb_root_path, $phpEx;
-
$module_class = ($module_class === false) ? $this->module_class : $module_class;
- $directory = $phpbb_root_path . 'includes/' . $module_class . '/info/';
+ $directory = PHPBB_ROOT_PATH . 'includes/' . $module_class . '/info/';
$fileinfo = array();
if (!$module)
@@ -549,9 +546,9 @@ class acp_modules
while (($file = readdir($dh)) !== false)
{
// Is module?
- if (preg_match('/^' . $module_class . '_.+\.' . $phpEx . '$/', $file))
+ if (preg_match('/^' . $module_class . '_.+\.' . PHP_EXT . '$/', $file))
{
- $class = str_replace(".$phpEx", '', $file) . '_info';
+ $class = str_replace('.' . PHP_EXT, '', $file) . '_info';
if (!class_exists($class))
{
@@ -578,7 +575,7 @@ class acp_modules
if (!class_exists($class))
{
- include($directory . $filename . '.' . $phpEx);
+ include($directory . $filename . '.' . PHP_EXT);
}
// Get module title tag