mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
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
This commit is contained in:
@@ -33,8 +33,7 @@ class mcp_notes
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $auth, $db, $user, $template;
|
||||
global $config, $phpbb_root_path, $phpEx;
|
||||
global $auth, $db, $user, $template, $config;
|
||||
|
||||
$action = request_var('action', array('' => ''));
|
||||
|
||||
@@ -49,8 +48,8 @@ class mcp_notes
|
||||
{
|
||||
case 'front':
|
||||
$template->assign_vars(array(
|
||||
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp&field=username&select_single=true'),
|
||||
'U_POST_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes'),
|
||||
'U_FIND_USERNAME' => append_sid('memberlist', 'mode=searchuser&form=mcp&field=username&select_single=true'),
|
||||
'U_POST_ACTION' => append_sid('mcp', 'i=notes&mode=user_notes'),
|
||||
|
||||
'L_TITLE' => $user->lang['MCP_NOTES'],
|
||||
));
|
||||
@@ -72,8 +71,7 @@ class mcp_notes
|
||||
*/
|
||||
function mcp_notes_user_view($action)
|
||||
{
|
||||
global $phpEx, $phpbb_root_path, $config;
|
||||
global $template, $db, $user, $auth;
|
||||
global $template, $db, $user, $auth, $config;
|
||||
|
||||
$user_id = request_var('u', 0);
|
||||
$username = request_var('username', '', true);
|
||||
@@ -176,7 +174,7 @@ class mcp_notes
|
||||
// Generate the appropriate user information for the user we are looking at
|
||||
if (!function_exists('get_user_avatar'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
|
||||
include(PHPBB_ROOT_PATH . 'includes/functions_display.' . PHP_EXT);
|
||||
}
|
||||
|
||||
$rank_title = $rank_img = '';
|
||||
|
Reference in New Issue
Block a user