summaryrefslogtreecommitdiff
path: root/lib/imagefile.php
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2010-03-18 18:13:54 -0400
committerBrion Vibber <brion@pobox.com>2010-03-18 15:39:06 -0700
commit26ba430ae8163089c4a1d0aee5d5f21bb0dbf96f (patch)
treecec4118c3c53eb6b6f1add4f1cdf53c376b2c9e4 /lib/imagefile.php
parentb149b88953d6d071066a12a7c96eac6970664a88 (diff)
Remove xpm support (no one really uses it, and IMAGETYPE_XPM is undefined, causing warnings)
Remove erroneous call to unlink in the constructor
Diffstat (limited to 'lib/imagefile.php')
-rw-r--r--lib/imagefile.php9
1 files changed, 0 insertions, 9 deletions
diff --git a/lib/imagefile.php b/lib/imagefile.php
index 2134623b1..e47287741 100644
--- a/lib/imagefile.php
+++ b/lib/imagefile.php
@@ -67,10 +67,8 @@ class ImageFile
$info[2] == IMAGETYPE_BMP ||
($info[2] == IMAGETYPE_WBMP && function_exists('imagecreatefromwbmp')) ||
($info[2] == IMAGETYPE_XBM && function_exists('imagecreatefromxbm')) ||
- ($info[2] == IMAGETYPE_XPM && function_exists('imagecreatefromxpm')) ||
($info[2] == IMAGETYPE_PNG && function_exists('imagecreatefrompng')))) {
- @unlink($_FILES[$param]['tmp_name']);
throw new Exception(_('Unsupported image file format.'));
return;
}
@@ -161,9 +159,6 @@ class ImageFile
case IMAGETYPE_XBM:
$image_src = imagecreatefromxbm($this->filepath);
break;
- case IMAGETYPE_XPM:
- $image_src = imagecreatefromxpm($this->filepath);
- break;
default:
throw new Exception(_('Unknown file type'));
return;
@@ -206,10 +201,6 @@ class ImageFile
//we don't want to save XBM... it's a rare format that we can't guarantee clients will support
//save png instead
$this->type = IMAGETYPE_PNG;
- } else if($this->type == IMAGETYPE_XPM) {
- //we don't want to save XPM... it's a rare format that we can't guarantee clients will support
- //save png instead
- $this->type = IMAGETYPE_PNG;
}
$outname = Avatar::filename($this->id,