|
From: Jon O. <jon...@us...> - 2005-10-02 23:39:58
|
Update of /cvsroot/mxbb/mx_profilecp/profilcp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7601/modules/mx_profilecp/profilcp Modified Files: profilcp_email.php Log Message: fiddling with new email classes, from phpbb, decided against it, will use original methods Index: profilcp_email.php =================================================================== RCS file: /cvsroot/mxbb/mx_profilecp/profilcp/profilcp_email.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** profilcp_email.php 22 Sep 2005 10:11:46 -0000 1.4 --- profilcp_email.php 1 Oct 2005 08:54:53 -0000 1.5 *************** *** 54,61 **** if ( !$userdata['session_logged_in'] ) { - //redirect(append_sid("login.$phpEx?redirect=profile.$phpEx&mode=email&" . POST_USERS_URL . "=$user_id", true)); - $redirect = str_replace("?", "&", this_profile_mxurl("mode=email&" . POST_USERS_URL . "=$user_id") ); mx_redirect(append_sid($mx_root_path . "login.$phpEx?redirect=". $redirect, true)); } --- 54,62 ---- if ( !$userdata['session_logged_in'] ) { $redirect = str_replace("?", "&", this_profile_mxurl("mode=email&" . POST_USERS_URL . "=$user_id") ); mx_redirect(append_sid($mx_root_path . "login.$phpEx?redirect=". $redirect, true)); + // mx_redirect(append_sid($mx_root_path . "login.$phpEx?redirect=".this_profile_mxurl("mode=email&" . POST_USERS_URL . "=$user_id"), true)); + // redirect(append_sid("login.$phpEx?redirect=profile.$phpEx&mode=email&" . POST_USERS_URL . "=$user_id", true)); + // redirect(append_sid("login.$phpEx?redirect=" . ( $is_block ? "index.$phpEx&page=$page_id&mode=" : "profile.$phpEx&mode=" ) . "email&" . POST_USERS_URL . "=$user_id", true)); } *************** *** 81,84 **** --- 82,91 ---- if ( isset($HTTP_POST_VARS['submit']) ) { + // session id check + if ( ($sid == '' || $sid != $userdata['session_id']) && !defined('NO_SID') ) + { + message_die(GENERAL_ERROR, 'Invalid_session'); + } + $error = FALSE; *************** *** 116,121 **** $emailer = new emailer($board_config['smtp_delivery']); ! $emailer->from($userdata['user_email']); ! $emailer->replyto($userdata['user_email']); $email_headers .= 'X-AntiAbuse: Board servername - ' . $server_name . "\n"; --- 123,139 ---- $emailer = new emailer($board_config['smtp_delivery']); ! //-- mod : profilcp -------------------------------------------------------------------------------- ! $email_headers = ''; ! switch ( $board_config['version'] ) ! { ! case '.0.4': ! $email_headers = 'Return-Path: ' . $userdata['user_email'] . "\nFrom: " . $userdata['user_email'] . "\n"; ! break; ! default: ! $emailer->from($userdata['user_email']); ! $emailer->replyto($userdata['user_email']); ! break; ! } ! //-- fin mod : profilcp ---------------------------------------------------------------------------- $email_headers .= 'X-AntiAbuse: Board servername - ' . $server_name . "\n"; *************** *** 154,158 **** } //-- fin mod : profilcp ---------------------------------------------------------------------------- - $emailer->use_template('profile_send_email'); $emailer->email_address($userdata['user_email']); --- 172,175 ---- *************** *** 160,164 **** $emailer->extra_headers($email_headers); - $emailer->assign_vars(array( 'SITENAME' => $board_config['sitename'], --- 177,180 ---- |