sylvieg | 2 Apr 2007 15:13
Picon

tiki/lib/trackers trackerlib.php, 1.97.2.128, 1.97.2.129

Update of /cvsroot/tikiwiki/tiki/lib/trackers
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv20278/lib/trackers

Modified Files:
      Tag: BRANCH-1-9
	trackerlib.php 
Log Message:
[FIX]tracker: do not expanse an image if the uploadLimitScale is larger than the real image size

Index: trackerlib.php
===================================================================
RCS file: /cvsroot/tikiwiki/tiki/lib/trackers/trackerlib.php,v
retrieving revision 1.97.2.128
retrieving revision 1.97.2.129
diff -u -d -r1.97.2.128 -r1.97.2.129
--- trackerlib.php	1 Apr 2007 19:15:35 -0000	1.97.2.128
+++ trackerlib.php	2 Apr 2007 13:13:44 -0000	1.97.2.129
 <at>  <at>  -716,8 +716,12  <at>  <at> 
 						if (!empty($opts[4])) {
 							global $imagegallib;include_once('lib/imagegals/imagegallib.php');
 							$imagegallib->image = $ins_fields["data"][$i]['value'];
-							$imagegallib->rescaleImage($opts[4], $opts[4]);
-							$ins_fields["data"][$i]['value'] = $imagegallib->image;
+							$imagegallib->readimagefromstring();
+							$imagegallib->getimageinfo();
+							if ($imagegallib->xsize > $opts[4] || $imagegallib->xsize > $opts[4]) {
+								$imagegallib->rescaleImage($opts[4], $opts[4]);
+								$ins_fields["data"][$i]['value'] = $imagegallib->image;
+							}
 						}
 						if ($ins_fields["data"][$i]['file_size'] <= $this->imgMaxSize) {

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

Gmane