mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-07 09:16:55 +02:00
ok, this one is rather large... the most important change:
re-introduce append_sid: old style continues to work, not a performance hog as it was in 2.0.x -> structure is different apart from this, code cleanage, bug fixing, etc. git-svn-id: file:///svn/phpbb/trunk@6015 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -33,9 +33,11 @@
|
||||
*/
|
||||
class ucp_pm
|
||||
{
|
||||
var $u_action;
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $user, $template, $phpbb_root_path, $auth, $phpEx, $db, $SID, $config;
|
||||
global $user, $template, $phpbb_root_path, $auth, $phpEx, $db, $config;
|
||||
|
||||
if (!$user->data['is_registered'])
|
||||
{
|
||||
@@ -95,8 +97,9 @@ class ucp_pm
|
||||
$template->assign_vars(array(
|
||||
'MESSAGE' => $l_new_message,
|
||||
'S_NOT_LOGGED_IN' => ($user->data['user_id'] == ANONYMOUS) ? true : false,
|
||||
'CLICK_TO_VIEW' => sprintf($user->lang['CLICK_VIEW_PRIVMSG'], '<a href="' . $phpbb_root_path . 'ucp.' . $phpEx . $SID . '&i=pm&folder=inbox" onclick="jump_to_inbox();return false;" target="_new">', '</a>'),
|
||||
'U_INBOX' => "{$phpbb_root_path}ucp.$phpEx$SID&i=pm&folder=inbox")
|
||||
'CLICK_TO_VIEW' => sprintf($user->lang['CLICK_VIEW_PRIVMSG'], '<a href="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=inbox') . '" onclick="jump_to_inbox();return false;" target="_new">', '</a>'),
|
||||
'U_INBOX' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=inbox'),
|
||||
'UA_INBOX' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=inbox', false))
|
||||
);
|
||||
|
||||
$tpl_file = 'ucp_pm_popup';
|
||||
@@ -330,24 +333,23 @@ class ucp_pm
|
||||
|
||||
// Header for message view - folder and so on
|
||||
$folder_status = get_folder_status($folder_id, $folder);
|
||||
$url = "{$phpbb_root_path}ucp.$phpEx$SID&i=$id&mode=$mode";
|
||||
|
||||
$template->assign_vars(array(
|
||||
'CUR_FOLDER_ID' => $folder_id,
|
||||
'CUR_FOLDER_NAME' => $folder_status['folder_name'],
|
||||
'NUM_NOT_MOVED' => $num_not_moved,
|
||||
'RELEASE_MESSAGE_INFO' => sprintf($user->lang['RELEASE_MESSAGES'], '<a href="' . $url . '&folder=' . $folder_id . '&release=1">', '</a>'),
|
||||
'RELEASE_MESSAGE_INFO' => sprintf($user->lang['RELEASE_MESSAGES'], '<a href="' . $this->u_action . '&folder=' . $folder_id . '&release=1">', '</a>'),
|
||||
'NOT_MOVED_MESSAGES' => ($num_not_moved == 1) ? $user->lang['NOT_MOVED_MESSAGE'] : sprintf($user->lang['NOT_MOVED_MESSAGES'], $num_not_moved),
|
||||
|
||||
'S_FOLDER_OPTIONS' => $s_folder_options,
|
||||
'S_TO_FOLDER_OPTIONS' => $s_to_folder_options,
|
||||
'S_FOLDER_ACTION' => "$url&action=view_folder",
|
||||
'S_PM_ACTION' => "$url&action=$action",
|
||||
'S_FOLDER_ACTION' => $this->u_action . '&action=view_folder',
|
||||
'S_PM_ACTION' => $this->u_action . '&action=' . $action,
|
||||
|
||||
'U_INBOX' => "$url&folder=inbox",
|
||||
'U_OUTBOX' => "$url&folder=outbox",
|
||||
'U_SENTBOX' => "$url&folder=sentbox",
|
||||
'U_CREATE_FOLDER' => "$url&mode=options",
|
||||
'U_INBOX' => $this->u_action . '&folder=inbox',
|
||||
'U_OUTBOX' => $this->u_action . '&folder=outbox',
|
||||
'U_SENTBOX' => $this->u_action . '&folder=sentbox',
|
||||
'U_CREATE_FOLDER' => $this->u_action . '&mode=options',
|
||||
|
||||
'S_IN_INBOX' => ($folder_id == PRIVMSGS_INBOX) ? true : false,
|
||||
'S_IN_OUTBOX' => ($folder_id == PRIVMSGS_OUTBOX) ? true : false,
|
||||
@@ -393,7 +395,7 @@ class ucp_pm
|
||||
|
||||
$template->assign_vars(array(
|
||||
'L_TITLE' => $user->lang['UCP_PM_' . strtoupper($mode)],
|
||||
'S_UCP_ACTION' => "{$phpbb_root_path}ucp.$phpEx$SID&i=$id&mode=$mode" . ((isset($action)) ? "&action=$action" : ''))
|
||||
'S_UCP_ACTION' => $this->u_action . ((isset($action)) ? "&action=$action" : ''))
|
||||
);
|
||||
|
||||
// Set desired template
|
||||
|
Reference in New Issue
Block a user