MDL-15800: clean filelib.php, fix https image link into the edit profil page (weblib.php), and also into the YUI integration (ajaxlib.php)

This commit is contained in:
jerome
2008-10-07 02:09:51 +00:00
parent 2267cd6a20
commit 0dd18fa6f6
3 changed files with 18 additions and 11 deletions
+8 -2
View File
@@ -3,7 +3,7 @@
define('BYTESERVING_BOUNDARY', 's1k2o3d4a5k6s7'); //unique string constant
function get_file_url($path, $options=null, $type='coursefile') {
global $CFG;
global $CFG, $HTTPSPAGEREQUIRED;
$path = str_replace('//', '/', $path);
$path = trim($path, '/'); // no leading and trailing slashes
@@ -17,7 +17,13 @@ function get_file_url($path, $options=null, $type='coursefile') {
$url = $CFG->wwwroot."/rss/file.php";
break;
case 'user':
$url = $CFG->wwwroot."/user/pix.php";
if (!empty($HTTPSPAGEREQUIRED)) {
$wwwroot = $CFG->httpswwwroot;
}
else {
$wwwroot = $CFG->wwwroot;
}
$url = $wwwroot."/user/pix.php";
break;
case 'usergroup':
$url = $CFG->wwwroot."/user/pixgroup.php";