From 70efd5689ac1c3cc4203e03553c0156ba8c65cbd Mon Sep 17 00:00:00 2001 From: skodak Date: Sun, 21 May 2006 20:35:22 +0000 Subject: [PATCH] fixed redirection to https:// for edit profile and change password when loginhttps on; merged from MOODLE_16_STABLE --- blocks/admin/block_admin.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/blocks/admin/block_admin.php b/blocks/admin/block_admin.php index 0837740f0b..2773d1a52c 100644 --- a/blocks/admin/block_admin.php +++ b/blocks/admin/block_admin.php @@ -92,6 +92,12 @@ class block_admin extends block_list { return $this->content; } + if(empty($CFG->loginhttps)) { + $securewwwroot = $CFG->wwwroot; + } else { + $securewwwroot = str_replace('http:','https:',$CFG->wwwroot); + } + $course = get_record('course', 'id', $this->instance->pageid); if (isteacher($this->instance->pageid)) { @@ -111,7 +117,7 @@ class block_admin extends block_list { $fullname = fullname($USER, true); - $editmyprofile = ''.get_string('editmyprofile').''; + $editmyprofile = ''.get_string('editmyprofile').''; if (empty($USER->description)) { //Accessibility: replace non-standard with CSS ( makes title visible in IE). $text = get_string('profile').' '.get_string('missingdescription'); @@ -208,7 +214,7 @@ class block_admin extends block_list { } $fullname = fullname($USER, true); - $editmyprofile = ''.get_string('editmyprofile').''; if (empty($USER->description)) { //Accessibility: replace non-standard with CSS ( makes title visible in IE). @@ -220,7 +226,7 @@ class block_admin extends block_list { $this->content->icons[]=''; if (is_internal_auth() && !is_restricted_user($USER->username)) { - $this->content->items[]=''.get_string('changepassword').''; + $this->content->items[]=''.get_string('changepassword').''; $this->content->icons[]=''; } else if ($CFG->changepassword && !is_restricted_user($USER->username)) { $this->content->items[]=''.get_string('changepassword').''; -- 2.39.5