summaryrefslogtreecommitdiff
path: root/post.php
diff options
context:
space:
mode:
authorMichael <savetheinternet@tinyboard.org>2013-01-18 23:02:24 -0800
committerMichael <savetheinternet@tinyboard.org>2013-01-18 23:02:24 -0800
commit6aac2472e66f87d2d38a3b0bd361e355836be49d (patch)
tree79b0b93d1b11f37cbff9f024e34c28ada39239cc /post.php
parentced540a66ee223ba2e3e2b8dbaaf50e5b48a13d8 (diff)
parent3a9ed90c585b0e97cbc3453f5a004c34e630cf00 (diff)
Merge pull request #92 from Macil/fixes
Miscellaneous bugfixes
Diffstat (limited to 'post.php')
-rw-r--r--post.php34
1 files changed, 6 insertions, 28 deletions
diff --git a/post.php b/post.php
index 16566b51..1153b46a 100644
--- a/post.php
+++ b/post.php
@@ -407,34 +407,12 @@ if (isset($_POST['delete'])) {
require_once 'inc/image.php';
- if ($config['thumb_method'] == 'imagick') {
- // This is tricky, because Imagick won't let us find
- // an image's dimensions without loading it all into
- // memory first, unlike GD which provides the
- // getimagesize() to do exactly that. This section
- // is why GD is required, even when using Imagick
- // instead. There doesn't seem to be an alternative.
- // Necessary for security, as Imagick even ignores
- // PHP's memory limit.
-
- // first try GD's getimagesize()
- if ($size = @getimagesize($upload)) {
- if ($size[0] > $config['max_width'] || $size[1] > $config['max_height']) {
-
- error($config['error']['maxsize']);
- }
- } else {
- // GD failed
- // TODO?
- }
- } else {
- // find dimensions of an image using GD
- if (!$size = @getimagesize($upload)) {
- error($config['error']['invalidimg']);
- }
- if ($size[0] > $config['max_width'] || $size[1] > $config['max_height']) {
- error($config['error']['maxsize']);
- }
+ // find dimensions of an image using GD
+ if (!$size = @getimagesize($upload)) {
+ error($config['error']['invalidimg']);
+ }
+ if ($size[0] > $config['max_width'] || $size[1] > $config['max_height']) {
+ error($config['error']['maxsize']);
}
// create image object