aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp/ucp_pm_compose.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/ucp/ucp_pm_compose.php')
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php45
1 files changed, 22 insertions, 23 deletions
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php
index af592e3612..298fd6ef18 100644
--- a/phpBB/includes/ucp/ucp_pm_compose.php
+++ b/phpBB/includes/ucp/ucp_pm_compose.php
@@ -22,12 +22,11 @@ if (!defined('IN_PHPBB'))
*/
function compose_pm($id, $mode, $action)
{
- global $template, $db, $auth, $user;
- global $phpbb_root_path, $phpEx, $config;
+ global $template, $db, $auth, $user, $config;
- include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
- include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
- include($phpbb_root_path . 'includes/message_parser.' . $phpEx);
+ include(PHPBB_ROOT_PATH . 'includes/functions_posting.' . PHP_EXT);
+ include(PHPBB_ROOT_PATH . 'includes/functions_display.' . PHP_EXT);
+ include(PHPBB_ROOT_PATH . 'includes/message_parser.' . PHP_EXT);
if (!$action)
{
@@ -71,9 +70,9 @@ function compose_pm($id, $mode, $action)
{
if ($msg_id)
{
- redirect(append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=view&action=view_message&p=' . $msg_id));
+ redirect(append_sid('ucp', 'i=pm&mode=view&action=view_message&p=' . $msg_id));
}
- redirect(append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm'));
+ redirect(append_sid('ucp', 'i=pm'));
}
// Output PM_TO box if message composing
@@ -113,7 +112,7 @@ function compose_pm($id, $mode, $action)
'S_SHOW_PM_BOX' => true,
'S_ALLOW_MASS_PM' => ($config['allow_mass_pm'] && $auth->acl_get('u_masspm')) ? true : false,
'S_GROUP_OPTIONS' => ($config['allow_mass_pm'] && $auth->acl_get('u_masspm')) ? $group_options : '',
- 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=searchuser&form=postform&field=username_list&select_single=$select_single"),
+ 'U_FIND_USERNAME' => append_sid('memberlist', "mode=searchuser&form=postform&field=username_list&select_single=$select_single"),
));
}
@@ -343,7 +342,7 @@ function compose_pm($id, $mode, $action)
$message_parser->message = ($action == 'reply') ? '' : $message_text;
unset($message_text);
- $s_action = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=$id&mode=$mode&action=$action", true, $user->session_id);
+ $s_action = append_sid('ucp', "i=$id&mode=$mode&action=$action", true, $user->session_id);
$s_action .= ($msg_id) ? "&p=$msg_id" : '';
// Delete triggered ?
@@ -358,7 +357,7 @@ function compose_pm($id, $mode, $action)
delete_pm($user->data['user_id'], $msg_id, $folder_id);
// jump to next message in "history"? nope, not for the moment. But able to be included later.
- $meta_info = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=pm&folder=$folder_id");
+ $meta_info = append_sid('ucp', "i=pm&folder=$folder_id");
$message = $user->lang['MESSAGE_DELETED'];
meta_refresh(3, $meta_info);
@@ -373,11 +372,11 @@ function compose_pm($id, $mode, $action)
'action' => 'delete'
);
- // "{$phpbb_root_path}ucp.$phpEx?i=pm&mode=compose"
+ // "ucp.php?i=pm&mode=compose"
confirm_box(false, 'DELETE_MESSAGE', build_hidden_fields($s_hidden_fields));
}
- redirect(append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=view&action=view_message&p=' . $msg_id));
+ redirect(append_sid('ucp', 'i=pm&mode=view&action=view_message&p=' . $msg_id));
}
// Handle User/Group adding/removing
@@ -470,7 +469,7 @@ function compose_pm($id, $mode, $action)
);
$db->sql_query($sql);
- $redirect_url = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=pm&mode=$mode");
+ $redirect_url = append_sid('ucp', "i=pm&mode=$mode");
meta_refresh(3, $redirect_url);
$message = $user->lang['DRAFT_SAVED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $redirect_url . '">', '</a>');
@@ -641,8 +640,8 @@ function compose_pm($id, $mode, $action)
// ((!$message_subject) ? $subject : $message_subject)
$msg_id = submit_pm($action, $subject, $pm_data);
- $return_message_url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=view&amp;p=' . $msg_id);
- $return_folder_url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;folder=outbox');
+ $return_message_url = append_sid('ucp', 'i=pm&amp;mode=view&amp;p=' . $msg_id);
+ $return_folder_url = append_sid('ucp', 'i=pm&amp;folder=outbox');
meta_refresh(3, $return_message_url);
$message = $user->lang['MESSAGE_STORED'] . '<br /><br />' . sprintf($user->lang['VIEW_PRIVATE_MESSAGE'], '<a href="' . $return_message_url . '">', '</a>') . '<br /><br />' . sprintf($user->lang['CLICK_RETURN_FOLDER'], '<a href="' . $return_folder_url . '">', '</a>', $user->lang['PM_OUTBOX']);
@@ -724,11 +723,11 @@ function compose_pm($id, $mode, $action)
$post_id = request_var('p', 0);
if ($config['allow_post_links'])
{
- $message_link = "[url=" . generate_board_url() . "/viewtopic.$phpEx?p={$post_id}#p{$post_id}]{$user->lang['SUBJECT']}: {$message_subject}[/url]\n\n";
+ $message_link = "[url=" . generate_board_url() . '/viewtopic.' . PHP_EXT . "?p={$post_id}#p{$post_id}]{$user->lang['SUBJECT']}: {$message_subject}[/url]\n\n";
}
else
{
- $message_link = $user->lang['SUBJECT'] . ': ' . $message_subject . " (" . generate_board_url() . "/viewtopic.$phpEx?p={$post_id}#p{$post_id})\n\n";
+ $message_link = $user->lang['SUBJECT'] . ': ' . $message_subject . " (" . generate_board_url() . '/viewtopic.' . PHP_EXT . "?p={$post_id}#p{$post_id})\n\n";
}
}
else
@@ -749,11 +748,11 @@ function compose_pm($id, $mode, $action)
if ($config['allow_post_links'])
{
- $quote_username_text = '[url=' . generate_board_url() . "/memberlist.$phpEx?mode=viewprofile&amp;u={$post['author_id']}]{$quote_username}[/url]";
+ $quote_username_text = '[url=' . generate_board_url() . '/memberlist.' . PHP_EXT . "?mode=viewprofile&amp;u={$post['author_id']}]{$quote_username}[/url]";
}
else
{
- $quote_username_text = $quote_username . ' (' . generate_board_url() . "/memberlist.$phpEx?mode=viewprofile&amp;u={$post['author_id']})";
+ $quote_username_text = $quote_username . ' (' . generate_board_url() . '/memberlist.' . PHP_EXT . "?mode=viewprofile&amp;u={$post['author_id']})";
}
$forward_text = array();
@@ -881,7 +880,7 @@ function compose_pm($id, $mode, $action)
else
{
$tpl_ary = array_merge($tpl_ary, array(
- 'U_VIEW' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;g=' . $id),
+ 'U_VIEW' => append_sid('memberlist', 'mode=group&amp;g=' . $id),
));
}
@@ -944,7 +943,7 @@ function compose_pm($id, $mode, $action)
'SUBJECT' => (isset($message_subject)) ? $message_subject : '',
'MESSAGE' => $message_text,
- 'BBCODE_STATUS' => ($bbcode_status) ? sprintf($user->lang['BBCODE_IS_ON'], '<a href="' . append_sid("{$phpbb_root_path}faq.$phpEx", 'mode=bbcode') . '">', '</a>') : sprintf($user->lang['BBCODE_IS_OFF'], '<a href="' . append_sid("{$phpbb_root_path}faq.$phpEx", 'mode=bbcode') . '">', '</a>'),
+ 'BBCODE_STATUS' => ($bbcode_status) ? sprintf($user->lang['BBCODE_IS_ON'], '<a href="' . append_sid('faq', 'mode=bbcode') . '">', '</a>') : sprintf($user->lang['BBCODE_IS_OFF'], '<a href="' . append_sid('faq', 'mode=bbcode') . '">', '</a>'),
'IMG_STATUS' => ($img_status) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'],
'FLASH_STATUS' => ($flash_status) ? $user->lang['FLASH_IS_ON'] : $user->lang['FLASH_IS_OFF'],
'SMILIES_STATUS' => ($smilies_status) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'],
@@ -977,8 +976,8 @@ function compose_pm($id, $mode, $action)
'S_HIDDEN_FIELDS' => $s_hidden_fields,
'S_CLOSE_PROGRESS_WINDOW' => isset($_POST['add_file']),
- 'U_PROGRESS_BAR' => append_sid("{$phpbb_root_path}posting.$phpEx", 'f=0&amp;mode=popup'),
- 'UA_PROGRESS_BAR' => addslashes(append_sid("{$phpbb_root_path}posting.$phpEx", 'f=0&amp;mode=popup')),
+ 'U_PROGRESS_BAR' => append_sid('posting', 'f=0&amp;mode=popup'),
+ 'UA_PROGRESS_BAR' => addslashes(append_sid('posting', 'f=0&amp;mode=popup')),
));
// Build custom bbcodes array