aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/privmsg.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2002-04-20 00:22:29 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2002-04-20 00:22:29 +0000
commit5b0bba72b1c619af2f39859ec0c262f860f991ac (patch)
tree9fb003cf223ff6bf2e26feb78a35603dff88a471 /phpBB/privmsg.php
parent65aa92182826eb06830626df49ab7a0210b06718 (diff)
downloadforums-5b0bba72b1c619af2f39859ec0c262f860f991ac.tar
forums-5b0bba72b1c619af2f39859ec0c262f860f991ac.tar.gz
forums-5b0bba72b1c619af2f39859ec0c262f860f991ac.tar.bz2
forums-5b0bba72b1c619af2f39859ec0c262f860f991ac.tar.xz
forums-5b0bba72b1c619af2f39859ec0c262f860f991ac.zip
merged from 2.0.0 branch (marked merge_point_20020420) + assorted updates and trial stuff for example session alterations
git-svn-id: file:///svn/phpbb/trunk@2532 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/privmsg.php')
-rw-r--r--phpBB/privmsg.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/phpBB/privmsg.php b/phpBB/privmsg.php
index 074c5c392b..04107dac60 100644
--- a/phpBB/privmsg.php
+++ b/phpBB/privmsg.php
@@ -99,11 +99,11 @@ else
$mode = '';
}
-$start = ( !empty($HTTP_GET_VARS['start']) ) ? $HTTP_GET_VARS['start'] : 0;
+$start = ( !empty($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;
if ( isset($HTTP_POST_VARS[POST_POST_URL]) || isset($HTTP_GET_VARS[POST_POST_URL]) )
{
- $privmsg_id = ( isset($HTTP_POST_VARS[POST_POST_URL]) ) ? $HTTP_POST_VARS[POST_POST_URL] : $HTTP_GET_VARS[POST_POST_URL];
+ $privmsg_id = ( isset($HTTP_POST_VARS[POST_POST_URL]) ) ? intval($HTTP_POST_VARS[POST_POST_URL]) : intval($HTTP_GET_VARS[POST_POST_URL]);
}
else
{
@@ -173,7 +173,7 @@ else if ( $mode == 'read' )
{
if ( !empty($HTTP_GET_VARS[POST_POST_URL]) )
{
- $privmsgs_id = $HTTP_GET_VARS[POST_POST_URL];
+ $privmsgs_id = intval($HTTP_GET_VARS[POST_POST_URL]);
}
else
{
@@ -472,9 +472,9 @@ else if ( $mode == 'read' )
$pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>';
$pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';
- if ( !empty($privmsg['user_viewemail']) || $is_auth['auth_mod'] )
+ if ( !empty($privmsg['user_viewemail']) || $userdata['user_level'] == ADMIN )
{
- $email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&amp;" . POST_USERS_URL .'=' . $poster_id) : 'mailto:' . $privmsg['user_email'];
+ $email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&amp;" . POST_USERS_URL .'=' . $user_id_from) : 'mailto:' . $privmsg['user_email'];
$email_img = '<a href="' . $email_uri . '"><img src="' . $images['icon_email'] . '" alt="' . $lang['Send_email'] . '" title="' . $lang['Send_email'] . '" border="0" /></a>';
$email = '<a href="' . $email_uri . '">' . $lang['Send_email'] . '</a>';
@@ -910,7 +910,7 @@ else if ( $submit || $refresh || $mode != '' )
if ( !$userdata['session_logged_in'] )
{
- $user_id = ( isset($HTTP_GET_VARS[POST_USERS_URL]) ) ? '&' . POST_USERS_URL . '=' . $HTTP_GET_VARS[POST_USERS_URL] : '';
+ $user_id = ( isset($HTTP_GET_VARS[POST_USERS_URL]) ) ? '&' . POST_USERS_URL . '=' . intval($HTTP_GET_VARS[POST_USERS_URL]) : '';
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
header($header_location . append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=$folder&mode=$mode" . $user_id, true));
}
@@ -1037,7 +1037,7 @@ else if ( $submit || $refresh || $mode != '' )
$msg_time = time();
- if ( $mode != "edit" )
+ if ( $mode != 'edit' )
{
//
// See if recipient is at their inbox limit
@@ -1087,7 +1087,7 @@ else if ( $submit || $refresh || $mode != '' )
message_die(GENERAL_ERROR, "Could not insert/update private message sent info.", "", __LINE__, __FILE__, $sql_info);
}
- if ( $mode != "edit" )
+ if ( $mode != 'edit' )
{
$privmsg_sent_id = $db->sql_nextid();
@@ -1225,7 +1225,7 @@ else if ( $submit || $refresh || $mode != '' )
if ( !empty($HTTP_GET_VARS[POST_USERS_URL]) )
{
- $user_id = $HTTP_GET_VARS[POST_USERS_URL];
+ $user_id = intval($HTTP_GET_VARS[POST_USERS_URL]);
$sql = "SELECT username
FROM " . USERS_TABLE . "
@@ -1745,7 +1745,7 @@ switch( $folder )
//
if ( $submit_msgdays && ( !empty($HTTP_POST_VARS['msgdays']) || !empty($HTTP_GET_VARS['msgdays']) ) )
{
- $msg_days = ( !empty($HTTP_POST_VARS['msgdays']) ) ? $HTTP_POST_VARS['msgdays'] : $HTTP_GET_VARS['msgdays'];
+ $msg_days = ( !empty($HTTP_POST_VARS['msgdays']) ) ? intval($HTTP_POST_VARS['msgdays']) : intval($HTTP_GET_VARS['msgdays']);
$min_msg_time = time() - ($msg_days * 86400);
$limit_msg_time_total = " AND privmsgs_date > $min_msg_time";