[svn r12902] fix a bug when uploading pictures

skala
Eric Marguin 18 years ago
parent 502e39c92e
commit 0c1c1d9b10
  1. 5
      main/auth/profile.php

@ -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];

Loading…
Cancel
Save