From 1c2728547bc2e14d311b900eec2cbd803f231224 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@users.sourceforge.net>
Date: Sun, 21 Feb 2010 01:53:01 +0000
Subject: [PATCH] New: Add patch from meos to resize images

---
 COPYRIGHT                 | 2 ++
 htdocs/lib/images.lib.php | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/COPYRIGHT b/COPYRIGHT
index f78dfe17884..60242009dad 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -20,6 +20,7 @@ FPDI              1.2.1    Apache Software License 2.0 No GPL3 only     PDF temp
 FPDI_Protection   1.0.2    Apache Software License 2.0 No GPL3 only     PDF encryption (8 files)
 GeoIP             x.x                                  Yes              GeoIP Maxmind conversion
 iWebkit			  4.6.2	   LGPL 3.0					   Yes				Iphone templates framework
+JCrop			  0.9.8	   MIT Licence				   Yes				JS library to crop images
 MagPieRss         0.72     GPL 2.0                     Yes              Load RSS
 NuSoap            0.7.3    LGPL 2.1                    Yes              Interfaces with third tools
 OdtPHP            1.0.1    GPL 2.0                     Yes              Mibrary to build/edit ODT files
@@ -44,6 +45,7 @@ Copyright (C) 2010
 - Regis Houssin <regis@dolibarr.fr>
 - simnandez
 - r2gnl
+- meos
 
 Copyright (C) 2009
 - Laurent Destailleur <eldy@users.sourceforge.net>
diff --git a/htdocs/lib/images.lib.php b/htdocs/lib/images.lib.php
index b85854b0fd4..1c494ed37dd 100644
--- a/htdocs/lib/images.lib.php
+++ b/htdocs/lib/images.lib.php
@@ -97,7 +97,6 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName='_small', $
 
 	$fichier = realpath($file); 	// Chemin canonique absolu de l'image
 	$dir = dirname($file); 			// Chemin du dossier contenant l'image
-	$dirthumb = $dir.($outdir?'/'.$outdir:''); 	// Chemin du dossier contenant les vignettes
 
 	$infoImg = getimagesize($fichier); // Recuperation des infos de l'image
 	$imgWidth = $infoImg[0]; // Largeur de l'image
@@ -140,6 +139,7 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName='_small', $
 	}
 
 	// On cree le repertoire contenant les vignettes
+	$dirthumb = $dir.($outdir?'/'.$outdir:''); 	// Chemin du dossier contenant les vignettes
 	create_exdir($dirthumb);
 
 	// Initialisation des variables selon l'extension de l'image
-- 
GitLab