aboutsummaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-06-21 23:03:23 +0000
committerCash Costello <cash.costello@gmail.com>2009-06-21 23:03:23 +0000
commitd723ef3f6e5ba2567cb494943ba6aaeaac6c7e22 (patch)
tree7327df8c7730c39f187300de8a7ded9fcda2ce33 /actions
parent6e2f754b98b70c494dcd5d37ae68c31bd85cc070 (diff)
downloadelgg-d723ef3f6e5ba2567cb494943ba6aaeaac6c7e22.tar.gz
elgg-d723ef3f6e5ba2567cb494943ba6aaeaac6c7e22.tar.bz2
better job catching no settings
Diffstat (limited to 'actions')
-rw-r--r--actions/upload.php33
1 files changed, 17 insertions, 16 deletions
diff --git a/actions/upload.php b/actions/upload.php
index 65005671a..f062edc80 100644
--- a/actions/upload.php
+++ b/actions/upload.php
@@ -30,7 +30,7 @@
$image_lib = get_plugin_setting('image_lib', 'tidypics');
if (!$image_lib)
- $image_lib = 'GD';
+ $image_lib = "GD";
// post limit exceeded
if (count($_FILES) == 0) {
@@ -153,29 +153,30 @@
}
- if ($image_lib == 'GD') {
-
- if (tp_create_gd_thumbnails($file, $prefix, $filestorename) != true) {
- trigger_error('Tidypics warning: failed to create thumbnails', E_USER_WARNING);
- }
+ if ($image_lib == 'ImageMagick') { // ImageMagick command line
- } else if ($image_lib == 'ImageMagickPHP') { // ImageMagick PHP
-
- if (tp_create_imagick_thumbnails($file, $prefix, $filestorename) != true) {
- trigger_error('Tidypics warning: failed to create thumbnails', E_USER_WARNING);
- }
-
- } else { // ImageMagick command line
-
$thumbs = tp_create_imagick_cmdline_thumbnails($file, $prefix, $filestorename);
if(!count($thumbs)) {
- trigger_error('Tidypics warning: failed to create thumbnails', E_USER_WARNING);
+ trigger_error('Tidypics warning: failed to create thumbnails - ImageMagick command line', E_USER_WARNING);
}
-
+
$album = get_entity($container_guid);
tp_watermark($thumbs);
+
+ } else if ($image_lib == 'ImageMagickPHP') { // ImageMagick PHP
+
+ if (tp_create_imagick_thumbnails($file, $prefix, $filestorename) != true) {
+ trigger_error('Tidypics warning: failed to create thumbnails - ImageMagick PHP', E_USER_WARNING);
+ }
+
+ } else {
+
+ if (tp_create_gd_thumbnails($file, $prefix, $filestorename) != true) {
+ trigger_error('Tidypics warning: failed to create thumbnails - GD', E_USER_WARNING);
+ }
+
} // end of image library selector
//keep one file handy so we can add a notice to the river if single image option selected