From fef76848f2e6f52d5f4941b9b519aadf996070cf Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sun, 21 Jun 2009 13:26:48 +0000 Subject: added quota message --- views/default/tidypics/forms/upload.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'views/default') diff --git a/views/default/tidypics/forms/upload.php b/views/default/tidypics/forms/upload.php index a8f3c8386..c4313bf40 100644 --- a/views/default/tidypics/forms/upload.php +++ b/views/default/tidypics/forms/upload.php @@ -4,11 +4,21 @@ //this is for image uploads only. Image edits are handled by edit.php form $container_guid = get_input('container_guid'); - $access_id = get_entity($vars['album'])->access_id; + $album = get_entity($vars['album']); + $access_id = $album->access_id; $maxfilesize = (int) get_plugin_setting('maxfilesize','tidypics'); if (!$maxfilesize) $maxfilesize = 5; + + $quota = get_plugin_setting('quota','tidypics'); + if ($quota) { + $image_repo_size_md = get_metadata_byname($album->container_guid, "image_repo_size"); + $image_repo_size = (int)$image_repo_size_md->value; + $image_repo_size = round($image_repo_size / 1024 / 1024); + if ($image_repo_size > $quota) + $image_repo_size = $quota; + } ?>
@@ -19,6 +29,13 @@



+ +
+

Uploading images
...
-- cgit v1.2.3