<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -41,11 +41,6 @@
 	# Define size of image (maximum width or height)- if specified via get.
 	$thumb_size = (isset($_GET['size'])) ? (int) $_GET[&quot;size&quot;] : 0;
 
-	if (isset($_GET['sizex']) and (int) $_GET[&quot;sizex&quot;] &gt; 0) {
-		$thumb_size_x = (int) $_GET[&quot;sizex&quot;];
-		$thumb_size_y = (isset($_GET['sizey']) and (int) $_GET[&quot;sizey&quot;] &gt; 0) ? (int) $_GET[&quot;sizey&quot;] : $thumb_size_x ;
-	}
-
 	$filename = fallback($_GET['file'], $image_error, true);
 
 	$filename = str_replace(&quot;\'&quot;,&quot;'&quot;,$filename);
@@ -53,10 +48,15 @@
 	$filename = str_replace(&quot;//&quot;,&quot;/&quot;,$filename);
 	$fileextension = substr($filename, strrpos($filename, &quot;.&quot;) + 1);
 
+	list($original_width, $original_height, $type, $attr) = getimagesize($filename);
+
+	if (isset($_GET['sizex']) and (int) $_GET[&quot;sizex&quot;] &gt; 0) {
+		$thumb_size_x = (int) $_GET[&quot;sizex&quot;];
+		$thumb_size_y = (isset($_GET['sizey']) and (int) $_GET[&quot;sizey&quot;] &gt; 0) ? (int) $_GET[&quot;sizey&quot;] : $original_height ;
+	}
+
 	$cache_file = INCLUDES_DIR.&quot;/caches/thumb_&quot;.
 	              md5($filename.$thumb_size.$thumb_size_x.$thumb_size_y.$quality).'.'.$fileextension;
-
-	list($original_width, $original_height, $type, $attr) = getimagesize($filename);
 	if ($original_width &lt; $thumb_size_x and $original_height &lt; $thumb_size_y)
 		header(&quot;Location: &quot;.$filename);
 
@@ -73,10 +73,8 @@
 		exit; # no need to create thumbnail - it already exists in the cache
 	}
 
-	# determine php and gd versions
-	$ver = (int) str_replace(&quot;.&quot;, &quot;&quot;, phpversion());
-	if ($ver &gt;= 430)
-		$gd_version = gd_info();
+	# determine gd version
+	$gd_version = gd_info();
 
 	# define the right function for the right image types
 	if (!$image_type_arr = getimagesize($filename)) {</diff>
      <filename>feathers/photo/thumb.php</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a28b3f382316eb7e1ca51f6a37ddd572cac31423</id>
    </parent>
  </parents>
  <author>
    <name>Alex Suraci</name>
    <email>i.am@toogeneric.com</email>
  </author>
  <url>http://github.com/vito/chyrp/commit/ef5ae7a0265e1689a93b839188dd51d1f16b10b0</url>
  <id>ef5ae7a0265e1689a93b839188dd51d1f16b10b0</id>
  <committed-date>2008-07-10T02:18:11-07:00</committed-date>
  <authored-date>2008-07-10T02:18:11-07:00</authored-date>
  <message>Fixed thumbnail scaling when it doesn't need to.</message>
  <tree>9f334d93414cf796c13ce60a251e1cd54238a073</tree>
  <committer>
    <name>Alex Suraci</name>
    <email>i.am@toogeneric.com</email>
  </committer>
</commit>
