From 8c6b1ed3de82c6eca9e1c6899d0a9c8859a9e510 Mon Sep 17 00:00:00 2001 From: strentini <none@none> Date: Thu, 12 Jan 2012 11:39:56 +0100 Subject: [PATCH] OO-43 : only check for quota if file was selected (and thus uploaded) -> prevent RS --- .../ui/podcast/EpisodeFormController.java | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/olat/modules/webFeed/ui/podcast/EpisodeFormController.java b/src/main/java/org/olat/modules/webFeed/ui/podcast/EpisodeFormController.java index a5c0d003980..a5c7fea1c42 100644 --- a/src/main/java/org/olat/modules/webFeed/ui/podcast/EpisodeFormController.java +++ b/src/main/java/org/olat/modules/webFeed/ui/podcast/EpisodeFormController.java @@ -190,18 +190,20 @@ public class EpisodeFormController extends FormBasicController { } else { flc.setDirty(true); } - } - - if(baseDir.getLocalSecurityCallback() == null || baseDir.getLocalSecurityCallback().getQuota() != null) { - Quota feedQuota = baseDir.getLocalSecurityCallback().getQuota(); - Long remainingQuotaKb = feedQuota.getRemainingSpace(); - if (remainingQuotaKb != -1 && file.getUploadFile().length() / 1024 > remainingQuotaKb) { - String supportAddr = WebappHelper.getMailConfig("mailSupport"); - Long uploadLimitKB = feedQuota.getUlLimitKB(); - getWindowControl().setError(translate("ULLimitExceeded", new String[] { Formatter.roundToString(uploadLimitKB.floatValue() / 1024f, 1), supportAddr })); + + // quota check + if(baseDir.getLocalSecurityCallback() == null || baseDir.getLocalSecurityCallback().getQuota() != null) { + Quota feedQuota = baseDir.getLocalSecurityCallback().getQuota(); + Long remainingQuotaKb = feedQuota.getRemainingSpace(); + if (remainingQuotaKb != -1 && file.getUploadFile().length() / 1024 > remainingQuotaKb) { + String supportAddr = WebappHelper.getMailConfig("mailSupport"); + Long uploadLimitKB = feedQuota.getUlLimitKB(); + getWindowControl().setError(translate("ULLimitExceeded", new String[] { Formatter.roundToString(uploadLimitKB.floatValue() / 1024f, 1), supportAddr })); + } } } + //fxdiff FXOLAT-118: size for video podcast String width = widthEl.getValue(); widthEl.clearError(); -- GitLab