From d87beccaf75577bd69e770c744910e932cb328e3 Mon Sep 17 00:00:00 2001 From: akhil Date: Mon, 28 Mar 2022 17:46:15 +0530 Subject: [PATCH 1/2] Added mail quota usage patch --- Dockerfile | 2 +- patches/014-add-mail-usage.patch | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 patches/014-add-mail-usage.patch diff --git a/Dockerfile b/Dockerfile index 171dc48b..1cc0108d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,6 @@ ARG ECLOUD_LAUNCHER_JOB_ID="222001" ARG GOOGLE_INTEGRATION_VERSION="1.0.6" RUN sed -i 's/22,2,6,2/22,2,6,3/' ${BASE_DIR}/version.php - # Install unzip for unzipping artifacts RUN apt-get update && apt-get install unzip @@ -111,6 +110,7 @@ RUN patch -u ${BASE_DIR}/lib/private/Updater.php -i ${TMP_PATCH_DIR}/010-disable RUN cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/011-privacy-settings.patch RUN cd ${BASE_DIR} && patch -u ${BASE_DIR}/apps/dashboard/lib/Controller/DashboardController.php -i ${TMP_PATCH_DIR}/012-remove-user-status-widget.patch RUN patch -u ${BASE_DIR}/lib/private/Authentication/Token/PublicKeyTokenProvider.php -i ${TMP_PATCH_DIR}/013-revert-token-password-update.patch +RUN patch -u ${BASE_DIR}/lib/private/legacy/OC_Helper.php -i ${TMP_PATCH_DIR}/014-add-mail-usage.patch RUN rm -rf ${TMP_PATCH_DIR} # autocomplete leak tweak apps frontend with sed, disable group suggestion diff --git a/patches/014-add-mail-usage.patch b/patches/014-add-mail-usage.patch new file mode 100644 index 00000000..d9cf77aa --- /dev/null +++ b/patches/014-add-mail-usage.patch @@ -0,0 +1,23 @@ +--- ./lib/private/legacy/OC_Helper.php 2022-03-28 17:42:25.107644314 +0530 ++++ ./lib/private/legacy/OC_Helper-new.php 2022-03-28 17:44:07.349596051 +0530 +@@ -532,6 +532,12 @@ + $quota = $sourceStorage->getQuota(); + } + $free = $sourceStorage->free_space($internalPath); ++ $ownerId = $storage->getOwner($path); ++ $mailQuotaUsage = (int) \OC::$server->getConfig()->getUserValue($ownerId, 'ecloud-accounts', 'mailQuotaUsage', 0); ++ $free = $free - $mailQuotaUsage; ++ if($path === '/') { ++ $used = $used + $mailQuotaUsage; ++ } + if ($free >= 0) { + $total = $free + $used; + } else { +@@ -547,7 +553,6 @@ + $relative = 0; + } + +- $ownerId = $storage->getOwner($path); + $ownerDisplayName = ''; + $owner = \OC::$server->getUserManager()->get($ownerId); + if ($owner) { -- GitLab From 8b7e48919bccc0fda58488000994f53f1a2d3516 Mon Sep 17 00:00:00 2001 From: akhil Date: Mon, 28 Mar 2022 17:47:39 +0530 Subject: [PATCH 2/2] bump version number --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1cc0108d..ea60fd1a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ ARG EA_TAG="1.0.0" ARG ECLOUD_LAUNCHER_JOB_ID="222001" ARG GOOGLE_INTEGRATION_VERSION="1.0.6" -RUN sed -i 's/22,2,6,2/22,2,6,3/' ${BASE_DIR}/version.php +RUN sed -i 's/22,2,6,2/22,2,6,4/' ${BASE_DIR}/version.php # Install unzip for unzipping artifacts RUN apt-get update && apt-get install unzip -- GitLab