diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-11-18 18:11:42 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-11-18 18:11:42 +0000 |
commit | c7bc2e37bd911db403d20da02797161e58643f99 (patch) | |
tree | cc54171cc6f49062adf723fcd356c290658f2729 | |
parent | 612c3ee1fb5021dea4651ea213c03d542af634a8 (diff) | |
download | forums-c7bc2e37bd911db403d20da02797161e58643f99.tar forums-c7bc2e37bd911db403d20da02797161e58643f99.tar.gz forums-c7bc2e37bd911db403d20da02797161e58643f99.tar.bz2 forums-c7bc2e37bd911db403d20da02797161e58643f99.tar.xz forums-c7bc2e37bd911db403d20da02797161e58643f99.zip |
Hopefully cope with boards running from SSL, ie. https://
git-svn-id: file:///svn/phpbb/trunk@1363 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r-- | phpBB/groupcp.php | 9 | ||||
-rw-r--r-- | phpBB/posting.php | 6 | ||||
-rw-r--r-- | phpBB/privmsg.php | 3 | ||||
-rw-r--r-- | phpBB/profile.php | 15 |
4 files changed, 20 insertions, 13 deletions
diff --git a/phpBB/groupcp.php b/phpBB/groupcp.php index cf13ce9e57..bd87e74439 100644 --- a/phpBB/groupcp.php +++ b/phpBB/groupcp.php @@ -171,6 +171,7 @@ else if( isset($HTTP_POST_VARS['joingroup']) && $group_id ) $path = (dirname($HTTP_SERVER_VARS['SCRIPT_NAME']) == "/") ? "" : dirname($HTTP_SERVER_VARS['SCRIPT_NAME']); $server_name = ( isset($HTTP_SERVER_VARS['HTTP_HOST']) ) ? $HTTP_SERVER_VARS['HTTP_HOST'] : $HTTP_SERVER_VARS['SERVER_NAME']; + $protocol = ( !empty($HTTP_SERVER_VARS['HTTPS']) ) ? "https://" : "http://"; $emailer->use_template("group_request"); $emailer->email_address($moderator['user_email']); @@ -182,7 +183,7 @@ else if( isset($HTTP_POST_VARS['joingroup']) && $group_id ) "GROUP_MODERATOR" => $moderator['username'], "EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']), - "U_GROUPCP" => "http://" . $server_name . $path . "/groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") + "U_GROUPCP" => $protocol . $server_name . $path . "/groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") ); $emailer->send(); $emailer->reset(); @@ -363,6 +364,7 @@ else if( $group_id ) $path = (dirname($HTTP_SERVER_VARS['SCRIPT_NAME']) == "/") ? "" : dirname($HTTP_SERVER_VARS['SCRIPT_NAME']); $server_name = ( isset($HTTP_SERVER_VARS['HTTP_HOST']) ) ? $HTTP_SERVER_VARS['HTTP_HOST'] : $HTTP_SERVER_VARS['SERVER_NAME']; + $protocol = ( !empty($HTTP_SERVER_VARS['HTTPS']) ) ? "https://" : "http://"; $emailer->use_template("group_added"); $emailer->email_address($row['user_email']); @@ -374,7 +376,7 @@ else if( $group_id ) "GROUP_NAME" => $group_name, "EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']), - "U_GROUPCP" => "http://" . $server_name . $path . "/groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") + "U_GROUPCP" => $protocol . $server_name . $path . "/groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") ); $emailer->send(); $emailer->reset(); @@ -475,6 +477,7 @@ else if( $group_id ) $path = (dirname($HTTP_SERVER_VARS['SCRIPT_NAME']) == "/") ? "" : dirname($HTTP_SERVER_VARS['SCRIPT_NAME']); $server_name = ( isset($HTTP_SERVER_VARS['HTTP_HOST']) ) ? $HTTP_SERVER_VARS['HTTP_HOST'] : $HTTP_SERVER_VARS['SERVER_NAME']; + $protocol = ( !empty($HTTP_SERVER_VARS['HTTPS']) ) ? "https://" : "http://"; $emailer->use_template("group_approved"); $emailer->email_address($email_addresses); @@ -486,7 +489,7 @@ else if( $group_id ) "GROUP_NAME" => $group_name, "EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']), - "U_GROUPCP" => "http://" . $server_name . $path . "/groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") + "U_GROUPCP" => $protocol . $server_name . $path . "/groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") ); $emailer->send(); $emailer->reset(); diff --git a/phpBB/posting.php b/phpBB/posting.php index bb47f1bc3a..9db20d6a01 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1387,8 +1387,8 @@ if( ( $submit || $confirm || $mode == "delete" ) && !$error ) $email_headers = "From: " . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\r\n"; $path = (dirname($HTTP_SERVER_VARS['SCRIPT_NAME']) == "/") ? "" : dirname($HTTP_SERVER_VARS['SCRIPT_NAME']); - $server_name = ( isset($HTTP_SERVER_VARS['HTTP_HOST']) ) ? $HTTP_SERVER_VARS['HTTP_HOST'] : $HTTP_SERVER_VARS['SERVER_NAME']; + $protocol = ( !empty($HTTP_SERVER_VARS['HTTPS']) ) ? "https://" : "http://"; for($i = 0; $i < count($email_set); $i++) { @@ -1405,8 +1405,8 @@ if( ( $submit || $confirm || $mode == "delete" ) && !$error ) "SITENAME" => $board_config['sitename'], "TOPIC_TITLE" => $email_set[$i]['topic_title'], - "U_TOPIC" => "http://" . $server_name . $path . "/viewtopic.$phpEx?" . POST_POST_URL . "=$new_post_id#$new_post_id", - "U_STOP_WATCHING_TOPIC" => "http://" . $server_name . $path . "/viewtopic.$phpEx?" . POST_TOPIC_URL . "=$new_topic_id&unwatch=topic") + "U_TOPIC" => $protocol . $server_name . $path . "/viewtopic.$phpEx?" . POST_POST_URL . "=$new_post_id#$new_post_id", + "U_STOP_WATCHING_TOPIC" => $protocol . $server_name . $path . "/viewtopic.$phpEx?" . POST_TOPIC_URL . "=$new_topic_id&unwatch=topic") ); $emailer->send(); diff --git a/phpBB/privmsg.php b/phpBB/privmsg.php index aad23921fe..e468e62702 100644 --- a/phpBB/privmsg.php +++ b/phpBB/privmsg.php @@ -989,6 +989,7 @@ else if( $submit || $refresh || $mode != "" ) { $path = (dirname($HTTP_SERVER_VARS['SCRIPT_NAME']) == "/") ? "" : dirname($HTTP_SERVER_VARS['SCRIPT_NAME']); $server_name = ( isset($HTTP_SERVER_VARS['HTTP_HOST']) ) ? $HTTP_SERVER_VARS['HTTP_HOST'] : $HTTP_SERVER_VARS['SERVER_NAME']; + $protocol = ( !empty($HTTP_SERVER_VARS['HTTPS']) ) ? "https://" : "http://"; $email_headers = "From: " . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\r\n"; @@ -1009,7 +1010,7 @@ else if( $submit || $refresh || $mode != "" ) "SITENAME" => $board_config['sitename'], "EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']), - "U_INBOX" => "http://" . $server_name . $path . "/privmsg.$phpEx?folder=inbox") + "U_INBOX" => $protocol . $server_name . $path . "/privmsg.$phpEx?folder=inbox") ); $emailer->send(); diff --git a/phpBB/profile.php b/phpBB/profile.php index 7b25355a0b..1ce7e8565b 100644 --- a/phpBB/profile.php +++ b/phpBB/profile.php @@ -345,7 +345,7 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ) $aim_img = ($profiledata['user_aim']) ? "<a href=\"aim:goim?screenname=" . $profiledata['user_aim'] . "&message=Hello+Are+you+there?\"><img src=\"" . $images['icon_aim'] . "\" border=\"0\" alt=\"" . $lang['AIM'] . "\" /></a>" : " "; - $msnm_img = ($profiledata['user_msnm']) ? "<a href=\"mailto:" . $profiledata['user_msnm'] . "\"><img src=\"" . $images['icon_msnm'] . "\" border=\"0\" alt=\"" . $lang['MSNM'] . "\" /></a> " . $profiledata['user_msnm'] : " "; + $msnm_img = ($profiledata['user_msnm']) ? "<img src=\"" . $images['icon_msnm'] . "\" border=\"0\" alt=\"" . $lang['MSNM'] . "\" /> " . $profiledata['user_msnm'] : " "; $yim_img = ( $profiledata['user_yim'] ) ? "<a href=\"http://edit.yahoo.com/config/send_webmesg?.target=" . $members[$i]['user_yim'] . "&.src=pg\"><img src=\"" . $images['icon_yim'] . "\" border=\"0\" alt=\"" . $lang['YIM'] . "\" /></a>" : " "; @@ -999,6 +999,7 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ) $path = (dirname($HTTP_SERVER_VARS['SCRIPT_NAME']) == "/") ? "" : dirname($HTTP_SERVER_VARS['SCRIPT_NAME']); $server_name = ( isset($HTTP_SERVER_VARS['HTTP_HOST']) ) ? $HTTP_SERVER_VARS['HTTP_HOST'] : $HTTP_SERVER_VARS['SERVER_NAME']; + $protocol = ( !empty($HTTP_SERVER_VARS['HTTPS']) ) ? "https://" : "http://"; if( $board_config['require_activation'] == USER_ACTIVATION_SELF ) { @@ -1018,7 +1019,7 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ) "USERNAME" => $username, "EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']), - "U_ACTIVATE" => "http://" . $server_name . $path . "/profile.$phpEx?mode=activate&act_key=$user_actkey") + "U_ACTIVATE" => $protocol . $server_name . $path . "/profile.$phpEx?mode=activate&act_key=$user_actkey") ); $emailer->send(); $emailer->reset(); @@ -1105,6 +1106,7 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ) $path = (dirname($HTTP_SERVER_VARS['SCRIPT_NAME']) == "/") ? "" : dirname($HTTP_SERVER_VARS['SCRIPT_NAME']); $server_name = ( isset($HTTP_SERVER_VARS['HTTP_HOST']) ) ? $HTTP_SERVER_VARS['HTTP_HOST'] : $HTTP_SERVER_VARS['SERVER_NAME']; + $protocol = ( !empty($HTTP_SERVER_VARS['HTTPS']) ) ? "https://" : "http://"; $emailer->use_template($email_template); $emailer->email_address($email); @@ -1119,7 +1121,7 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ) "PASSWORD" => $password_confirm, "EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']), - "U_ACTIVATE" => "http://" . $server_name . $path . "/profile.$phpEx?mode=activate&act_key=$user_actkey", + "U_ACTIVATE" => $protocol . $server_name . $path . "/profile.$phpEx?mode=activate&act_key=$user_actkey", "FAX_INFO" => $board_config['coppa_fax'], "MAIL_INFO" => $board_config['coppa_mail'], "EMAIL_ADDRESS" => $email, @@ -1141,7 +1143,7 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ) "PASSWORD" => $password_confirm, "EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']), - "U_ACTIVATE" => "http://" . $server_name . $path . "/profile.$phpEx?mode=activate&act_key=$user_actkey") + "U_ACTIVATE" => $protocol . $server_name . $path . "/profile.$phpEx?mode=activate&act_key=$user_actkey") ); } @@ -1160,7 +1162,7 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ) "USERNAME" => $username, "EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']), - "U_ACTIVATE" => "http://" . $server_name . $path . "/profile.$phpEx?mode=activate&act_key=$user_actkey") + "U_ACTIVATE" => $protocol . $server_name . $path . "/profile.$phpEx?mode=activate&act_key=$user_actkey") ); $emailer->send(); $emailer->reset(); @@ -1661,6 +1663,7 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ) $path = (dirname($HTTP_SERVER_VARS['SCRIPT_NAME']) == "/") ? "" : dirname($HTTP_SERVER_VARS['SCRIPT_NAME']); $server_name = ( isset($HTTP_SERVER_VARS['HTTP_HOST']) ) ? $HTTP_SERVER_VARS['HTTP_HOST'] : $HTTP_SERVER_VARS['SERVER_NAME']; + $protocol = ( !empty($HTTP_SERVER_VARS['HTTPS']) ) ? "https://" : "http://"; $emailer->use_template("user_activate_passwd"); $emailer->email_address($row['user_email']); @@ -1673,7 +1676,7 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ) "PASSWORD" => $user_password, "EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']), - "U_ACTIVATE" => "http://" . $server_name . $path . "/profile.$phpEx?mode=activate&act_key=$user_actkey") + "U_ACTIVATE" => $protocol . $server_name . $path . "/profile.$phpEx?mode=activate&act_key=$user_actkey") ); $emailer->send(); $emailer->reset(); |