From 9c87a260b6200bbfc488c9962abafb9ee774864a Mon Sep 17 00:00:00 2001 From: stronk7 Date: Thu, 14 Jul 2005 20:09:10 +0000 Subject: [PATCH] HTTPSPAGEREQUIRED and CFG->httpswwwroot added to support 100% SSL pages. --- lib/setup.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/setup.php b/lib/setup.php index 33e63a1876aa6..44144b302f5be 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -65,10 +65,23 @@ */ global $THEME; +/** + * HTTPSPAGEREQUIRED is a global to define if the page being displayed must run under HTTPS. + * + * It's primary goal is to allow 100% HTTPS pages when $CFG->loginhttps is enabled. Default to false. + * It's enabled only by the httpsrequired() function and used in some pages to update some URLs +*/ +global $HTTPSPAGEREQUIRED; + + if (!isset($CFG->wwwroot)) { die; } +/// Set httpswwwroot default value (this variable will replace $CFG->wwwroot +/// inside some URLs used in HTTPSPAGEREQUIRED pages. +$CFG->httpswwwroot = $CFG->wwwroot; + /// Time to start counting init_performance_info();