diff options
author | Marc Alexander <admin@m-a-styles.de> | 2019-02-11 08:01:17 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2019-02-11 08:01:17 +0100 |
commit | deebd282a7219ba8fbdb706a19e9b248f279080b (patch) | |
tree | 1c6c13c3fd05d365ba02c2a9c32272adb66d6fe7 /phpBB/includes/ucp/ucp_pm.php | |
parent | 27b07191742417d3b0e3ede32f07ff3de8fe34a0 (diff) | |
parent | b4672f2665a4425a8d597bb0c80dee8bfbd89ca0 (diff) | |
download | forums-deebd282a7219ba8fbdb706a19e9b248f279080b.tar forums-deebd282a7219ba8fbdb706a19e9b248f279080b.tar.gz forums-deebd282a7219ba8fbdb706a19e9b248f279080b.tar.bz2 forums-deebd282a7219ba8fbdb706a19e9b248f279080b.tar.xz forums-deebd282a7219ba8fbdb706a19e9b248f279080b.zip |
Merge pull request #5525 from kasimi/ticket/15954
[ticket/15954] Add safeguards to include() calls
Diffstat (limited to 'phpBB/includes/ucp/ucp_pm.php')
-rw-r--r-- | phpBB/includes/ucp/ucp_pm.php | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/phpBB/includes/ucp/ucp_pm.php b/phpBB/includes/ucp/ucp_pm.php index fa374c15c8..4d02620e89 100644 --- a/phpBB/includes/ucp/ucp_pm.php +++ b/phpBB/includes/ucp/ucp_pm.php @@ -82,7 +82,10 @@ class ucp_pm $mode = 'view'; } - include($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx); + if (!function_exists('get_folder')) + { + include($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx); + } switch ($mode) { @@ -104,7 +107,10 @@ class ucp_pm break; } - include($phpbb_root_path . 'includes/ucp/ucp_pm_compose.' . $phpEx); + if (!function_exists('compose_pm')) + { + include($phpbb_root_path . 'includes/ucp/ucp_pm_compose.' . $phpEx); + } compose_pm($id, $mode, $action, $user_folders); $tpl_file = 'posting_body'; @@ -114,7 +120,10 @@ class ucp_pm set_user_message_limit(); get_folder($user->data['user_id']); - include($phpbb_root_path . 'includes/ucp/ucp_pm_options.' . $phpEx); + if (!function_exists('message_options')) + { + include($phpbb_root_path . 'includes/ucp/ucp_pm_options.' . $phpEx); + } message_options($id, $mode, $global_privmsgs_rules, $global_rule_conditions); $tpl_file = 'ucp_pm_options'; @@ -125,8 +134,10 @@ class ucp_pm get_folder($user->data['user_id']); $this->p_name = 'pm'; - // Call another module... please do not try this at home... Hoochie Coochie Man - include($phpbb_root_path . 'includes/ucp/ucp_main.' . $phpEx); + if (!class_exists('ucp_main')) + { + include($phpbb_root_path . 'includes/ucp/ucp_main.' . $phpEx); + } $module = new ucp_main($this); $module->u_action = $this->u_action; @@ -375,7 +386,10 @@ class ucp_pm if ($action == 'view_folder') { - include($phpbb_root_path . 'includes/ucp/ucp_pm_viewfolder.' . $phpEx); + if (!function_exists('view_folder')) + { + include($phpbb_root_path . 'includes/ucp/ucp_pm_viewfolder.' . $phpEx); + } view_folder($id, $mode, $folder_id, $folder); $tpl_file = 'ucp_pm_viewfolder'; @@ -393,7 +407,10 @@ class ucp_pm trigger_error('NO_MESSAGE'); } - include($phpbb_root_path . 'includes/ucp/ucp_pm_viewmessage.' . $phpEx); + if (!function_exists('view_message')) + { + include($phpbb_root_path . 'includes/ucp/ucp_pm_viewmessage.' . $phpEx); + } view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row); $tpl_file = ($view == 'print') ? 'ucp_pm_viewmessage_print' : 'ucp_pm_viewmessage'; |