From 8ab04045ff430eaabdd25a86941e00ac8f6b85b4 Mon Sep 17 00:00:00 2001 From: skodak Date: Wed, 22 Aug 2007 20:03:45 +0000 Subject: [PATCH] MDL-10947 https was replaced with httpss when wwwroot already is https credit goes to Tobias Marx; backported from HEAD --- mod/choice/view.php | 2 +- mod/forum/markposts.php | 2 +- mod/forum/post.php | 2 +- mod/forum/settracking.php | 2 +- mod/forum/subscribe.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mod/choice/view.php b/mod/choice/view.php index ac88952729c..9ebe39ddb64 100644 --- a/mod/choice/view.php +++ b/mod/choice/view.php @@ -113,7 +113,7 @@ if (has_capability('moodle/legacy:guest', $sitecontext, NULL, false)) { // Guest on whole site $wwwroot = $CFG->wwwroot.'/login/index.php'; if (!empty($CFG->loginhttps)) { - $wwwroot = str_replace('http','https', $wwwroot); + $wwwroot = str_replace('http:','https:', $wwwroot); } notice_yesno(get_string('noguestchoose', 'choice').'

'.get_string('liketologin'), $wwwroot, $_SERVER['HTTP_REFERER']); diff --git a/mod/forum/markposts.php b/mod/forum/markposts.php index 75375069715..0dc755c177f 100644 --- a/mod/forum/markposts.php +++ b/mod/forum/markposts.php @@ -29,7 +29,7 @@ if (isguest()) { // Guests can't change forum $wwwroot = $CFG->wwwroot.'/login/index.php'; if (!empty($CFG->loginhttps)) { - $wwwroot = str_replace('http','https', $wwwroot); + $wwwroot = str_replace('http:','https:', $wwwroot); } $strforums = get_string('modulenameplural', 'forum'); diff --git a/mod/forum/post.php b/mod/forum/post.php index 1e648180682..a5760a15e10 100644 --- a/mod/forum/post.php +++ b/mod/forum/post.php @@ -24,7 +24,7 @@ $wwwroot = $CFG->wwwroot.'/login/index.php'; if (!empty($CFG->loginhttps)) { - $wwwroot = str_replace('http', 'https', $wwwroot); + $wwwroot = str_replace('http:', 'https:', $wwwroot); } if (!empty($forum)) { // User is starting a new discussion in a forum diff --git a/mod/forum/settracking.php b/mod/forum/settracking.php index 20754c3a982..35f5c63c710 100644 --- a/mod/forum/settracking.php +++ b/mod/forum/settracking.php @@ -27,7 +27,7 @@ if (isguest()) { // Guests can't change tracking $wwwroot = $CFG->wwwroot.'/login/index.php'; if (!empty($CFG->loginhttps)) { - $wwwroot = str_replace('http','https', $wwwroot); + $wwwroot = str_replace('http:','https:', $wwwroot); } $strforums = get_string('modulenameplural', 'forum'); diff --git a/mod/forum/subscribe.php b/mod/forum/subscribe.php index d807d8d851e..f2f5b3185fa 100644 --- a/mod/forum/subscribe.php +++ b/mod/forum/subscribe.php @@ -48,7 +48,7 @@ if (isguest()) { // Guests can't subscribe $wwwroot = $CFG->wwwroot.'/login/index.php'; if (!empty($CFG->loginhttps)) { - $wwwroot = str_replace('http','https', $wwwroot); + $wwwroot = str_replace('http:','https:', $wwwroot); } $strforums = get_string('modulenameplural', 'forum');