diff --git a/Dockerfile b/Dockerfile index c2c1c287a9e354478a638a146b450148d302e712..b8b7abe7eb538c38d3706d84f00ba004b39809f6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ ARG USER_MIGRATION_JOB_ID="608716" ARG MEMORIES_VERSION="6.1.5" ARG DROP_ACCOUNT_VERSION="2.3.2" -RUN sed -i 's/26,0,8,2/26,0,8,25/' ${BASE_DIR}/version.php +RUN sed -i 's/26,0,8,2/26,0,8,26/' ${BASE_DIR}/version.php COPY custom_entrypoint.sh / RUN chmod +x /custom_entrypoint.sh RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images @@ -142,7 +142,7 @@ RUN cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/009-help-links.patch RUN patch -u ${BASE_DIR}/lib/private/Updater.php -i ${TMP_PATCH_DIR}/010-disable-app-store-upgrade.patch RUN cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/011-privacy-settings.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 cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/014-add-mail-usage.patch RUN cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/015-email-mail-template.patch RUN patch -u ${BASE_DIR}/core/Command/User/Setting.php -i ${TMP_PATCH_DIR}/018-occ-user-setting.patch RUN patch -u ${BASE_DIR}/apps/files/js/files.js -i ${TMP_PATCH_DIR}/021-repeated-storage-dialog-fix.patch diff --git a/patches/014-add-mail-usage.patch b/patches/014-add-mail-usage.patch index cd4cf4a08d10a7c1dfea28dbed35adaf09cc7def..ca86e28f93a345042ff6685d8900476ea3acefd6 100644 --- a/patches/014-add-mail-usage.patch +++ b/patches/014-add-mail-usage.patch @@ -22,3 +22,17 @@ $ownerDisplayName = ''; $owner = \OC::$server->getUserManager()->get($ownerId); if ($owner) { +--- lib/private/Files/Storage/Wrapper/Quota.php 2024-02-28 23:45:03.136041704 +0530 ++++ lib/private/Files/Storage/Wrapper/Quota-new.php 2024-02-28 23:49:24.518192286 +0530 +@@ -117,7 +117,10 @@ + return FileInfo::SPACE_NOT_COMPUTED; + } else { + $free = $this->storage->free_space($path); +- $quotaFree = max($this->getQuota() - $used, 0); ++ $ownerId = $this->storage->getUser()->getUID(); ++ $mailQuotaUsage = (int) \OC::$server->getConfig()->getUserValue($ownerId, 'ecloud-accounts', 'mailQuotaUsage', 0); ++ $mailQuotaUsage = max($mailQuotaUsage, 0); // to avoid negative mail quota usage value ++ $quotaFree = max($this->getQuota() - $used - $mailQuotaUsage, 0); + // if free space is known + $free = $free >= 0 ? min($free, $quotaFree) : $quotaFree; + return $free;