aboutsummaryrefslogtreecommitdiff
path: root/views/default/tidypics/forms/upload.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/tidypics/forms/upload.php')
-rw-r--r--views/default/tidypics/forms/upload.php19
1 files changed, 18 insertions, 1 deletions
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;
+ }
?>
<div id="tidypics_ref"></div>
@@ -19,6 +29,13 @@
<p style="line-height:1.6em;">
<label><?php echo elgg_echo("images:upload"); ?></label><br />
<i><?php echo elgg_echo("tidypics:settings:maxfilesize") . ' ' . $maxfilesize; ?></i><br />
+<?php
+ if ($quota) {
+?>
+ <i><?php echo elgg_echo("tidypics:quota") . ' ' . $image_repo_size . '/' . $quota . ' MB'; ?></i><br />
+<?php
+ }
+?>
<div class="tidypics_popup">
Uploading images<br />
<div style="margin:20px 0px 20px 80px;"><img alt="..." border="0" src="<?php echo $vars['url'].'mod/tidypics/graphics/loader.gif' ?>" /></div>