From 478af07f910adae242f6ecbba094420627b1e4a0 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 22 Aug 2009 16:01:24 +0000 Subject: now handling max file size of less than 1 MB --- actions/upload.php | 2 +- views/default/tidypics/forms/admin.php | 2 ++ views/default/tidypics/forms/upload.php | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/actions/upload.php b/actions/upload.php index f189e3777..70480a498 100644 --- a/actions/upload.php +++ b/actions/upload.php @@ -17,7 +17,7 @@ $album = get_entity($container_guid); - $maxfilesize = get_plugin_setting('maxfilesize','tidypics'); + $maxfilesize = (float) get_plugin_setting('maxfilesize','tidypics'); if (!$maxfilesize) $maxfilesize = 5; // default to 5 MB if not set $maxfilesize = 1024 * 1024 * $maxfilesize; // convert to bytes from MBs diff --git a/views/default/tidypics/forms/admin.php b/views/default/tidypics/forms/admin.php index 1685f7791..c52348ecc 100644 --- a/views/default/tidypics/forms/admin.php +++ b/views/default/tidypics/forms/admin.php @@ -70,8 +70,10 @@ $form_body .= '

' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:view_count') => 'enabled'), 'internalname' => 'view_count', 'value' => $view_count )) . "

"; // Watermark Text +/* $form_body .= "

" . elgg_echo('tidypics:settings:watermark') . "
"; $form_body .= elgg_view("input/text",array('internalname' => 'params[watermark_text]', 'value' => $plugin->watermark_text)) . "

"; +*/ // Max Image Size $maxfilesize = $plugin->maxfilesize; diff --git a/views/default/tidypics/forms/upload.php b/views/default/tidypics/forms/upload.php index d3fc7828d..522a51c4b 100644 --- a/views/default/tidypics/forms/upload.php +++ b/views/default/tidypics/forms/upload.php @@ -7,7 +7,7 @@ $album = get_entity($vars['album']); $access_id = $album->access_id; - $maxfilesize = (int) get_plugin_setting('maxfilesize','tidypics'); + $maxfilesize = (float) get_plugin_setting('maxfilesize','tidypics'); if (!$maxfilesize) $maxfilesize = 5; -- cgit v1.2.3