|
|
|
@ -1,5 +1,5 @@ |
|
|
|
|
<?php |
|
|
|
|
// $Id: profile.php 12658 2007-06-19 22:17:19Z yannoo $ |
|
|
|
|
// $Id: profile.php 12902 2007-08-29 14:01:44Z elixir_inter $ |
|
|
|
|
/* |
|
|
|
|
============================================================================== |
|
|
|
|
Dokeos - elearning and course management software |
|
|
|
@ -353,11 +353,12 @@ function upload_user_image($user_id) |
|
|
|
|
$temp = new image($_FILES['picture']['tmp_name']); |
|
|
|
|
$picture_infos=getimagesize($_FILES['picture']['tmp_name']); |
|
|
|
|
$thumbwidth = IMAGE_THUMBNAIL_WIDTH; |
|
|
|
|
if(empty($thumbwidth) or $thumbwidth=0) |
|
|
|
|
if(empty($thumbwidth) or $thumbwidth==0) |
|
|
|
|
{ |
|
|
|
|
$thumbwidth=100; |
|
|
|
|
} |
|
|
|
|
$new_height = round(($thumbwidth/$picture_infos[0])*$picture_infos[1]); |
|
|
|
|
|
|
|
|
|
$temp->resize($thumbwidth,$new_height,0); |
|
|
|
|
$type=$picture_infos[2]; |
|
|
|
|
|
|
|
|
|