]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-9227 Inconsistent HTTPS for profile edit page; merged from MOODLE_17_STABLE
authorskodak <skodak>
Fri, 6 Apr 2007 07:51:18 +0000 (07:51 +0000)
committerskodak <skodak>
Fri, 6 Apr 2007 07:51:18 +0000 (07:51 +0000)
admin/user.php

index 9a16a17dcb11752fe311b38e507b39c71f2ed411..b0bb566f73f5bc8e831dfc63626edcf43dfbbc03 100644 (file)
     $strsearch = get_string('search');
     $strshowallusers = get_string('showallusers');
 
+    if (empty($CFG->loginhttps)) {
+        $securewwwroot = $CFG->wwwroot;
+    } else {
+        $securewwwroot = str_replace('http:','https:',$CFG->wwwroot);
+    }
+
     admin_externalpage_print_header($adminroot);
 
     if ($confirmuser and confirm_sesskey()) {
         }
 
         $mainadmin = get_admin();
-        if(empty($CFG->loginhttps)) {
-            $securewwwroot = $CFG->wwwroot;
-        } else {
-            $securewwwroot = str_replace('http:','https:',$CFG->wwwroot);
-        }
 
         $table->head = array ("$firstname / $lastname", $email, $city, $country, $lastaccess, "", "", "");
         $table->align = array ("left", "left", "left", "left", "left", "center", "center", "center");
     echo "</td></tr></table>";
 
     if (has_capability('moodle/user:create', $sitecontext)) {
-        print_heading('<a href="../user/editadvanced.php?id=-1">'.get_string('addnewuser').'</a>');
+        print_heading('<a href="'.$securewwwroot.'/user/editadvanced.php?id=-1">'.get_string('addnewuser').'</a>');
     }
     if (!empty($table)) {
         print_table($table);
                          "user.php?sort=$sort&amp;dir=$dir&amp;perpage=$perpage".
                          "&amp;firstinitial=$firstinitial&amp;lastinitial=$lastinitial&amp;search=".urlencode(stripslashes($search))."&amp;");
         if (has_capability('moodle/user:create', $sitecontext)) {
-            print_heading('<a href="../user/editadvanced.php?id=-1">'.get_string('addnewuser').'</a>');
+            print_heading('<a href="'.$securewwwroot.'/user/editadvanced.php?id=-1">'.get_string('addnewuser').'</a>');
         }
     }