summaryrefslogtreecommitdiff
path: root/lib/exe/fetch.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2008-05-16 15:13:48 +0200
committerAndreas Gohr <andi@splitbrain.org>2008-05-16 15:13:48 +0200
commitd52a56e1b845c0c3835ff216f1d54a636e33bba9 (patch)
treee76d937d347e1b2da82c1dfea04f5e40026b3653 /lib/exe/fetch.php
parenta7ead82d888b448626c5bde872208114cceaf5db (diff)
downloadrpg-d52a56e1b845c0c3835ff216f1d54a636e33bba9.tar.gz
rpg-d52a56e1b845c0c3835ff216f1d54a636e33bba9.tar.bz2
always crop when height is given
darcs-hash:20080516131348-7ad00-499fcf8660323913e0cff1fbf85d9ffb56ea113b.gz
Diffstat (limited to 'lib/exe/fetch.php')
-rw-r--r--lib/exe/fetch.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/exe/fetch.php b/lib/exe/fetch.php
index d0caffd46..cdcc4dd21 100644
--- a/lib/exe/fetch.php
+++ b/lib/exe/fetch.php
@@ -24,7 +24,6 @@
$CACHE = calc_cache($_REQUEST['cache']);
$WIDTH = (int) $_REQUEST['w'];
$HEIGHT = (int) $_REQUEST['h'];
- $CROP = (bool) $_REQUEST['crop'];
list($EXT,$MIME) = mimetype($MEDIA);
if($EXT === false){
$EXT = 'unknown';
@@ -68,7 +67,7 @@
//handle image resizing/cropping
if((substr($MIME,0,5) == 'image') && $WIDTH){
- if($CROP){
+ if($HEIGHT){
$FILE = get_cropped($FILE,$EXT,$WIDTH,$HEIGHT);
}else{
$FILE = get_resized($FILE,$EXT,$WIDTH,$HEIGHT);