aboutsummaryrefslogtreecommitdiff
path: root/actions/admin/create_thumbnails.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2012-07-13 22:02:22 -0400
committerCash Costello <cash.costello@gmail.com>2012-07-13 22:02:22 -0400
commit695651451b262c526d6aaf9d0988ce557ff50e95 (patch)
tree92afd91c81f851e78dd87af0e1f6c2f848f5a8b2 /actions/admin/create_thumbnails.php
parenta2e4f84be4da51b7ec8fbe625b1b26dde2ad9289 (diff)
parent67d855d73499f36f15331e1ff18cccd13aa8aa74 (diff)
downloadelgg-695651451b262c526d6aaf9d0988ce557ff50e95.tar.gz
elgg-695651451b262c526d6aaf9d0988ce557ff50e95.tar.bz2
Merging admin changes from Brett's repo
Diffstat (limited to 'actions/admin/create_thumbnails.php')
-rw-r--r--actions/admin/create_thumbnails.php60
1 files changed, 0 insertions, 60 deletions
diff --git a/actions/admin/create_thumbnails.php b/actions/admin/create_thumbnails.php
deleted file mode 100644
index a09965f65..000000000
--- a/actions/admin/create_thumbnails.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-/**
- * Tidypics Thumbnail Creation Test
- *
- * Called through ajax
- */
-
-include_once dirname(dirname(dirname(dirname(dirname(__FILE__))))) . "/engine/start.php";
-include dirname(dirname(dirname(__FILE__))) . "/lib/resize.php";
-
-global $CONFIG;
-
-$guid = get_input('guid');
-
-$image = get_entity($guid);
-if (!$image || !($image instanceof TidypicsImage)) {
- echo "Unable to get original image";
- return;
-}
-
-$filename = $image->getFilename();
-$container_guid = $image->container_guid;
-if (!$filename || !$container_guid) {
- echo "Error retrieving information about the image";
- return;
-}
-
-$title = $image->title;
-$prefix = "image/$container_guid/";
-$filestorename = substr($filename, strlen($prefix));
-
-$image_lib = get_plugin_setting('image_lib', 'tidypics');
-if (!$image_lib) {
- $image_lib = "GD";
-}
-
-if ($image_lib == 'ImageMagick') { // ImageMagick command line
-
- if (tp_create_im_cmdline_thumbnails($image, $prefix, $filestorename) != true) {
- trigger_error('Tidypics warning: failed to create thumbnails - ImageMagick command line', E_USER_WARNING);
- echo "Failed to create thumbnails";
- }
-
-} else if ($image_lib == 'ImageMagickPHP') { // imagick PHP extension
-
- if (tp_create_imagick_thumbnails($image, $prefix, $filestorename) != true) {
- trigger_error('Tidypics warning: failed to create thumbnails - ImageMagick PHP', E_USER_WARNING);
- echo "Failed to create thumbnails";
- }
-
-} else {
-
- if (tp_create_gd_thumbnails($image, $prefix, $filestorename) != true) {
- trigger_error('Tidypics warning: failed to create thumbnails - GD', E_USER_WARNING);
- echo "Failed to create thumbnails";
- }
-
-} // end of image library selector
-
-echo "<img id=\"tidypics_image\" src=\"{$CONFIG->wwwroot}mod/tidypics/thumbnail.php?file_guid={$guid}&amp;size=large\" alt=\"{$title}\" />";