From c578cfe537ee778f7d8225c037ea993a5e922df6 Mon Sep 17 00:00:00 2001 From: Cristian Fasanando Date: Wed, 25 Feb 2009 17:55:11 +0100 Subject: [PATCH] [svn r18697] Logic change - Fixed Migrate picture users to dokeos 1.8.6 - see FS#3720 --- main/install/update-db-1.8.5-1.8.6.inc.php | 69 +++++++++++++++++++--- 1 file changed, 62 insertions(+), 7 deletions(-) diff --git a/main/install/update-db-1.8.5-1.8.6.inc.php b/main/install/update-db-1.8.5-1.8.6.inc.php index 2de47b89ff..2daaf28ede 100644 --- a/main/install/update-db-1.8.5-1.8.6.inc.php +++ b/main/install/update-db-1.8.5-1.8.6.inc.php @@ -1,4 +1,4 @@ -resize($thumbwidth,$new_height,0); + + $type=$picture_infos[2]; + + // original picture + $big_temp = new image($image_repository); + switch (!empty($type)) { + case 2 : $temp->send_image('JPG',$picture_location); + $big_temp->send_image('JPG',$big_picture_location); + break; + case 3 : $temp->send_image('PNG',$picture_location); + $big_temp->send_image('JPG',$big_picture_location); + break; + case 1 : $temp->send_image('GIF',$picture_location); + $big_temp->send_image('JPG',$big_picture_location); + break; + } + if ($image_repository == $dir.$file) { + @unlink($image_repository); + } + } + } + } // Filling the access_url_rel_session table with access_url_id by default = 1 $query = "SELECT id FROM $dbNameForm.session"; $result = mysql_query($query);