aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-11-23 16:50:04 -0500
committerCash Costello <cash.costello@gmail.com>2011-11-23 16:50:04 -0500
commit0aa823656bf92ae472cb6780afb24f5a0390b880 (patch)
treed73409d132fac52dc44f06831c88556de090e273 /lib
parent4bfbb194ec1f9fc2647d1cb4e946fb95492076d6 (diff)
downloadelgg-0aa823656bf92ae472cb6780afb24f5a0390b880.tar.gz
elgg-0aa823656bf92ae472cb6780afb24f5a0390b880.tar.bz2
added editing of images
Diffstat (limited to 'lib')
-rw-r--r--lib/resize.php16
-rw-r--r--lib/upload.php4
2 files changed, 10 insertions, 10 deletions
diff --git a/lib/resize.php b/lib/resize.php
index 857d0ba1c..78b5290e6 100644
--- a/lib/resize.php
+++ b/lib/resize.php
@@ -19,11 +19,11 @@ include dirname(__FILE__) . "/watermark.php";
function tp_create_gd_thumbnails($file, $prefix, $filestorename) {
global $CONFIG;
- $image_sizes = get_plugin_setting('image_sizes', 'tidypics');
+ $image_sizes = elgg_get_plugin_setting('image_sizes', 'tidypics');
if (!$image_sizes) {
// move this out of library
register_error(elgg_echo('tidypics:nosettings'));
- forward($_SERVER['HTTP_REFERER']);
+ forward(REFERER);
return FALSE;
}
$image_sizes = unserialize($image_sizes);
@@ -38,8 +38,8 @@ function tp_create_gd_thumbnails($file, $prefix, $filestorename) {
$rtn_code = tp_gd_resize( $file->getFilenameOnFilestore(),
$thumbname,
FALSE,
- $image_sizes['thumb_image_width'],
- $image_sizes['thumb_image_height'],
+ $image_sizes['tiny_image_width'],
+ $image_sizes['tiny_image_height'],
TRUE);
if (!$rtn_code) {
return FALSE;
@@ -209,8 +209,8 @@ function tp_create_imagick_thumbnails($file, $prefix, $filestorename) {
$thumbname = $thumb->getFilenameOnFilestore();
$rtn_code = tp_imagick_resize( $file->getFilenameOnFilestore(),
$thumbname,
- $image_sizes['thumb_image_width'],
- $image_sizes['thumb_image_height'],
+ $image_sizes['tiny_image_width'],
+ $image_sizes['tiny_image_height'],
TRUE);
if (!$rtn_code) {
return FALSE;
@@ -335,8 +335,8 @@ function tp_create_im_cmdline_thumbnails($file, $prefix, $filestorename) {
$thumbname = $thumb->getFilenameOnFilestore();
$rtn_code = tp_im_cmdline_resize( $file->getFilenameOnFilestore(),
$thumbname,
- $image_sizes['thumb_image_width'],
- $image_sizes['thumb_image_height'],
+ $image_sizes['tiny_image_width'],
+ $image_sizes['tiny_image_height'],
TRUE);
if (!$rtn_code) {
return FALSE;
diff --git a/lib/upload.php b/lib/upload.php
index 30540dced..0b034517c 100644
--- a/lib/upload.php
+++ b/lib/upload.php
@@ -82,7 +82,7 @@ function tp_upload_memory_check($image_lib, $num_pixels) {
* @return bool false = too large
*/
function tp_upload_check_max_size($image_size) {
- $max_file_size = (float) get_plugin_setting('maxfilesize','tidypics');
+ $max_file_size = (float) elgg_get_plugin_setting('maxfilesize', 'tidypics');
if (!$max_file_size) {
// default to 5 MB if not set
$max_file_size = 5;
@@ -103,7 +103,7 @@ function tp_upload_check_quota($image_size, $owner_guid) {
static $quota;
if (!isset($quota)) {
- $quota = get_plugin_setting('quota','tidypics');
+ $quota = elgg_get_plugin_setting('quota', 'tidypics');
$quota = 1024 * 1024 * $quota;
}