aboutsummaryrefslogtreecommitdiff
path: root/actions/upload.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-05-17 17:45:58 +0000
committerCash Costello <cash.costello@gmail.com>2009-05-17 17:45:58 +0000
commit47a49c851ab285e7e4f48aa29247a8a71fdb9d5c (patch)
tree828eb5e03395149504b35f618ebdcce263c3a441 /actions/upload.php
parent7e09496c62e79eaaadbfdd2ee8b83602fde50497 (diff)
downloadelgg-47a49c851ab285e7e4f48aa29247a8a71fdb9d5c.tar.gz
elgg-47a49c851ab285e7e4f48aa29247a8a71fdb9d5c.tar.bz2
moved all resize code into lib/resize.php
Diffstat (limited to 'actions/upload.php')
-rw-r--r--actions/upload.php50
1 files changed, 2 insertions, 48 deletions
diff --git a/actions/upload.php b/actions/upload.php
index ecdeb27f7..7c50b95d4 100644
--- a/actions/upload.php
+++ b/actions/upload.php
@@ -6,7 +6,6 @@
*/
global $CONFIG;
- include dirname(__FILE__) . "/resize.php";
include dirname(dirname(__FILE__)) . "/lib/resize.php";
// Get common variables
@@ -138,60 +137,15 @@
*/
} else { // ImageMagick command line
-/*
+
if (tp_create_imagick_cmdline_thumbnails($file, $prefix, $filestorename) != true) {
trigger_error('Tidypics warning: failed to create thumbnails', E_USER_WARNING);
}
-*/
- //gfroese: build the actual thumbnails now
$album = get_entity($container_guid);
$user = get_user_entity_as_row($album->owner_guid);
$username = $user->username;
-
- try {
- $thumblarge = tp_resize($file->getFilenameOnFilestore(),
- "largethumb",
- $CONFIG->tidypics->image_large_width,
- $CONFIG->tidypics->image_large_height,
- false);
- } catch (Exception $e) { $thumblarge = false; }
- try {
- $thumbsmall = tp_resize($file->getFilenameOnFilestore(),
- "smallthumb",
- $CONFIG->tidypics->image_small_width,
- $CONFIG->tidypics->image_small_height,
- true);
- } catch (Exception $e) { $thumbsmall = false; }
- try {
- $thumbnail = tp_resize($file->getFilenameOnFilestore(),
- "thumb",
- $CONFIG->tidypics->image_thumb_width,
- $CONFIG->tidypics->image_thumb_height,
- true);
- } catch (Exception $e) { $thumbnail = false; }
-
- if ($thumbnail) {
- $thumb = new ElggFile();
- $thumb->setMimeType($mime);
- $thumb->setFilename($prefix."thumb".$filestorename);
- $file->thumbnail = $prefix."thumb".$filestorename;
- }
-
- if ($thumbsmall) {
- $thumb = new ElggFile();
- $thumb->setMimeType($mime);
- $thumb->setFilename($prefix."smallthumb".$filestorename);
- $file->smallthumb = $prefix."smallthumb".$filestorename;
- }
-
- if ($thumblarge) {
- $thumb = new ElggFile();
- $thumb->setMimeType($mime);
- $thumb->setFilename($prefix."largethumb".$filestorename);
- $file->largethumb = $prefix."largethumb".$filestorename;
- }
-
+
$im_path = get_plugin_setting('convert_command', 'tidypics');
if(!$im_path) {
$im_path = "/usr/bin/";