From 140f46a23826fe4d671995a9757487ea1d4bafbe Mon Sep 17 00:00:00 2001 From: Damyon Wiese Date: Wed, 8 Oct 2014 09:52:17 +0800 Subject: [PATCH] MDL-28484 Libraries: Update comments to suggest using new is_https() --- lib/pagelib.php | 2 +- lib/setup.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pagelib.php b/lib/pagelib.php index d39b5f2a0db..8f66ba5ca7c 100644 --- a/lib/pagelib.php +++ b/lib/pagelib.php @@ -1432,7 +1432,7 @@ class moodle_page { // Now the real test and redirect! // NOTE: do NOT use this test for detection of https on current page because this code is not compatible with SSL proxies, - // instead use (strpos($CFG->httpswwwroot, 'https:') === 0). + // instead use is_https(). if (strpos($FULLME, 'https:') !== 0) { // This may lead to infinite redirect on an incorrectly configured site. // In that case set $CFG->loginhttps=0; within /config.php. diff --git a/lib/setup.php b/lib/setup.php index ea5901530e1..5ba6be0b263 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -491,7 +491,7 @@ global $OUTPUT; * Full script path including all params, slash arguments, scheme and host. * * Note: Do NOT use for getting of current page URL or detection of https, - * instead use $PAGE->url or strpos($CFG->httpswwwroot, 'https:') === 0 + * instead use $PAGE->url or is_https(). * * @global string $FULLME * @name $FULLME