From a7c8da05349cac3ff99429481ac4500bc9e977f0 Mon Sep 17 00:00:00 2001 From: Diogo Peralta Cordeiro Date: Sat, 14 Aug 2021 16:17:15 +0100 Subject: [PATCH] [FileQuota] We'll get back to this plugin later --- plugins/FileQuota/FileQuota.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/FileQuota/FileQuota.php b/plugins/FileQuota/FileQuota.php index c78416eaaf..8a906f8b81 100644 --- a/plugins/FileQuota/FileQuota.php +++ b/plugins/FileQuota/FileQuota.php @@ -23,6 +23,7 @@ namespace Plugin\FileQuota; use App\Core\Cache; use App\Core\DB\DB; +use App\Core\Event; use App\Core\Modules\Plugin; use App\Util\Common; use App\Util\Exception\ClientException; @@ -45,8 +46,10 @@ class FileQuota extends Plugin * quotas. Handles per file, per user and per user-month quotas. * Throws on quota violations */ - public function onEnforceQuota(int $user_id, int $filesize) + public function onEnforceQuota(int $user_id, int $filesize): bool { + return Event::stop; + /* $file_quota = Common::config('attachments', 'file_quota'); if ($filesize > $file_quota) { // TRANS: Message given if an upload is larger than the configured maximum. @@ -87,6 +90,6 @@ END; // TRANS: Message given if an upload would exceed user quota. throw new ClientException(_m('A file this large would exceed your monthly quota of {quota} bytes.', ['quota' => $monthly_quota])); } - } + }*/ } }