|
@@ -1,4 +1,4 @@
|
|
|
-<?php // $Id: user_add.php 19952 2009-04-21 19:52:11Z cvargas1 $
|
|
|
+<?php // $Id: user_add.php 20075 2009-04-24 15:05:22Z cfasanando $
|
|
|
/*
|
|
|
==============================================================================
|
|
|
Dokeos - elearning and course management software
|
|
@@ -387,7 +387,8 @@ if( $form->validate())
|
|
|
if (empty($thumbwidth) or $thumbwidth==0) {
|
|
|
$thumbwidth=150;
|
|
|
}
|
|
|
- $new_height = round(($thumbwidth/$picture_infos[0])*$picture_infos[1]);
|
|
|
+ $divider = ($picture_infos[0] > 0)?$picture_infos[0]:1;
|
|
|
+ $new_height = round(($thumbwidth/$divider)*$picture_infos[1]);
|
|
|
|
|
|
$temp->resize($thumbwidth,$new_height,0);
|
|
|
$type=$picture_infos[2];
|