From 3a233b85c57780a8dcf1589410216d32988ea1f2 Mon Sep 17 00:00:00 2001 From: skodak Date: Wed, 22 Aug 2007 19:36:24 +0000 Subject: [PATCH] MDL-10947 https was replaced with httpss when wwwroot already is https credit goes to Tobias Marx --- 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 e5364dade8..7249de62e6 100644 --- a/mod/choice/view.php +++ b/mod/choice/view.php @@ -122,7 +122,7 @@ if ($action == 'delchoice') { 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 e8899ab164..5b859fd9a9 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 8b643d4a1e..0092e19e32 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 e1d7517507..766ad927bf 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 03a665b414..6baad93c68 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'); -- 2.39.5